jQuery remove(selector) doesn't seem to work
<p>I created a small jsfiddle:
<a href="http://jsfiddle.net/duRXc/" rel="nofollow">http://jsfiddle.net/duRXc/</a></p>

<pre><code>&lt;div data-role="wrapper"&gt;
    &lt;span class="to-be-removed" data-role="to-be-removed"&gt;
        text to be removed
    &lt;/span&gt;
&lt;/div&gt;
&lt;button id="remove1"&gt;Remove by jQuery object&lt;/button&gt;&lt;br&gt;
&lt;button id="remove2"&gt;Remove by selector&lt;/button&gt;&lt;br&gt;
&lt;button id="remove3"&gt;Remove by selector(class)&lt;/button&gt;

var $wrapper = $('[data-role="wrapper"]');

$('#remove1').on('click', function () {
    $wrapper.find('[data-role="to-be-removed"]').remove();
});

// this should work: http://api.jquery.com/remove/
$('#remove2').on('click', function () {
    $wrapper.remove('[data-role="to-be-removed"]');
});

// this should work: http://api.jquery.com/remove/
$('#remove3').on('click', function () {
    $wrapper.remove('.to-be-removed');
});
</code></pre>

<p>The problem I'm having is that the .remove(selector) overload is not working. I thought it had something to do with my data-role selector, but the remove by class selector doesn't work as well.</p>

<p>Am I doing something wrong? Or is this a bug in jQuery or maybe the docs are wrong:</p>

<blockquote>
  <p>We can also include a selector as an optional parameter</p>
</blockquote>

<p><a href="http://api.jquery.com/remove/" rel="nofollow">http://api.jquery.com/remove/</a></p>
