How to create a jQuery plugin, extending jQuery the easy way
I have read a great book on jQuery Learning JQuery. I skimmed through the chapter on extending jQuery and creating its plugins. It is quite easy. All you have to do is to use this template: (function($){
$.fn.extend({
myFunk: function() {
// You must return jQuery object
return $();
},
myPunk: function() {
return this.addClass
$.fn.extend({
myFunk: function() {
// You must return jQuery object
return $();
},
myPunk: function() {
return this.addClass
Comments
Post a Comment