And if I recall correctly, .after() and its ilk return the original 
element if only for the logistical difficulty of determining what part 
of the (not necessarily single element wrapped. for example 
$('p').after('<p class="first"></p><p class="last"></p>'); is the 
p.first in the jQuery set or is p.last in the jQuery set?) new elements 
to assign to the jQuery set. And .clone() returns the cloned elements 
but you can return to the original set through the wonders of .end()

-blair

Kurt Mackey wrote:
> Yep, that's correct, even if I can't write very clearly. ;)
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Blair Mitchelmore
> Sent: Wednesday, October 11, 2006 1:07 PM
> To: jQuery Discussion.
> Subject: Re: [jQuery] Documentation of return objects?
>
> I think what he's talking about is whether or not it returns what was 
> just added to the document or the original element. Another example 
> would be whether or not .clone() return the cloned elements in the 
> jQuery set or the original elements. Those sorts of things aren't listed
>
> in the documentation.
>
> -blair
>
> John Resig wrote:
>>> Anyway, that link's a start, but it doesn't help clarify what .after
>>> returns, for instance.
>> According to that link, .after() always returns a jQuery object. While
>> .html() can return either a jQuery object or a String, depending on
>> the arguments passed in.
>>
>> If something returns a jQuery object, that means that its chainable
>> and that you can continue to add actions on to it (e.g.
>> $().after().html("foo").after()...)
>>
>> --John
>


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to