Skip to content

Instantly share code, notes, and snippets.

@notdol
Created September 17, 2013 06:44
Show Gist options
  • Select an option

  • Save notdol/6590798 to your computer and use it in GitHub Desktop.

Select an option

Save notdol/6590798 to your computer and use it in GitHub Desktop.
jquery:plugins:init
(function($){
$.fn.method = function(customOptions){
var options = $.extend({},$.fn.method.defaultOptions,customOptions);
return this.each(function(){
var $this = $(this);
if($.isFunction(options.complete)){
options.complete.apply(this);
};
});
}
$.fn.method.defaultOptions = {
//complete : function(){} //complete callback
};
})(jQuery)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment