Created
July 8, 2010 21:08
-
-
Save calvinf/468626 to your computer and use it in GitHub Desktop.
jQuery Plugin Stub
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;(function($) { | |
$.fn.myPlugin = function(options) { | |
var defaults = { | |
}; | |
var options = $.extend(defaults, options); | |
function log(message) { /* debug function */ | |
if (console && console.log) { | |
console.log(message); | |
} | |
} | |
return this.each(function(){ | |
var $this = $(this); | |
}); | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is my take on an initial jQuery plugin stub. Inspiration taken from a variety of sources including: http://www.learningjquery.com/2007/10/a-plugin-development-pattern.