String to jQuery object, how to remove elements
<p>I'm trying to manipulate some html which is in a textarea (not part of the page) but I want to be able to perform jQuery functions on it.</p>

<p>Here I am trying to remove the div with the attr 'my_id' of 1234, but the resulting data remains the same?</p>

<pre><code>var data = "&lt;div&gt;something&lt;div my_id='1224'&gt;blah&lt;/div&gt;&lt;div my_id='1234'&gt;xx123&lt;/div&gt;&lt;/div&gt;";

var id = '1234';

$(data).remove('[my_id="'+id+'"]');

alert($(data).html());
</code></pre>

<p>Obviously just using alert for debugging.</p>
