Saturday, October 30, 2010

Functions in JQuery

Functions in JQuery
$.fn.myFunction = function() {
return $(this).addClass('changed');
}
And now, use it like this:
$('.changePlease').myFunction();
And that is all there is :)

No comments:

Post a Comment