This is actually a bizarre construction. What it's doing is setting a 
click event on every element in the jQuery object '$l' but then it's 
setting the scope of the event handler as the actual jQuery object. This 
results in running jQuery.fn.hide on all elements of the jQuery set when 
either of them is clicked. Not really practical, just some fun code.

--
blair

David Duymelinck wrote:
> Blair Mitchelmore schreef:
>> I was saddened and chagrined to discover that the event system didn't 
>> have additional arbitrary arguments as I thought it did and so I wrote 
>> them in. I modified the event system very slightly to allow for both 
>> additional arguments and scope modification (two features of the Yahoo 
>> Event Utility I always thought were very useful when I developed with 
>> it). I have my typical level of documentation (read: as little as I can 
>> manage) at the demo page I set up ( http://jquery.offput.ca/event++/ ). 
>> It was a pretty simple rewrite and hopefully it will be of use to someone.
>>   
> I liked what i saw but can you explain why you need to set the variable 
> twice?
>
> $l.click(jQuery.fn.hide,$l,true);
>


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

Reply via email to