contents().find() not producing the same result as changing selector context? - jQuery
<p>I have a function that looks somewhat like this:</p>

<pre><code>function(domObj) {
    var currentObj = $(domObj);
    ...
    currentObj.contents().find(".ws").after("foobar");
}
</code></pre>

<p>My problem is that the above method of using <code>.contents().find()</code> is not working. "foobar" never gets stuffed after the specified dom element, represented by the selector, <code>.ws</code> </p>

<p>However if I do this:</p>

<pre><code>$(".ws", currentObj).after("foobar"); 
</code></pre>

<p>Then the string, "foobar" gets appended every time. </p>

<p>My question:</p>

<p>Are not these two methods supposed to be equivilant? How/what am I doing wrong in my use of <code>.contents().find()</code> so that it is not working?</p>

<p>Thanks!</p>
