Skip to content

Instantly share code, notes, and snippets.

@crofty
Created March 3, 2010 15:56
Show Gist options
  • Save crofty/320698 to your computer and use it in GitHub Desktop.
Save crofty/320698 to your computer and use it in GitHub Desktop.
// Standard jQuery plugin pattern
(function($){
$.fn.pluginName = function(options) {
var options = $.extend({},$.fn.pluginName.defaults,options)
return this.each(function() {
// Code goes here
// $(this) //DOM element
//
});
};
$.fn.pluginName.defaults = {}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment