Yeh, I got that, but when you try to use a jquery object twice in a 
chain it doens't work...

$('div').each(
  $('div').find('img').hide();
  $('div').find('img').show();
);

Wouldn't it just be easier to pass back the this (instead of changing in 
the jquery object itself)?

Jörn Zaefferer wrote:
> Abdur-Rahman Advany schrieb:
>   
>> Hi guys,
>>
>> I am trying to figure out how jQuery works internally. There is a stack 
>> maintained within jQuery but why does jQuery change the 'this' array of 
>> objects? why not just pass back the modified array when using things 
>> like find?
>>   
>>     
> The stack allows to revert to older states. Check the documentation for 
> end(), that explains it better.
>
> -- Jörn
>   
>> Abdul
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>>
>>
>>   
>>     
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>   


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to