Possible Duplicate:
In jQuery, what does $.fn. mean?
Can someone explain the code below a little more ?
I see that a function called isdirty is defined. What I don't get is:
- What is $.fn ?
The second line calls the function on a selector. The function now seems a method of the object I selected ??? Can i attach this function to all objects like this?
(function($) { $.fn.isdirty = function(settings) { alert(test); }}; $('.dirtycheck').isdirty();