Skip to content

Instantly share code, notes, and snippets.

@mkalygin
Last active December 21, 2015 07:28
Show Gist options
  • Save mkalygin/6271229 to your computer and use it in GitHub Desktop.
Save mkalygin/6271229 to your computer and use it in GitHub Desktop.
jQuery Mini Widget
$.fn.miniwidget = function () {
var self = this;
return $.extend(true, self.each(function () {
var $this = $(self);
// initialization...
}), {
method: function () {
return self.each(function () {
var $this = $(this);
// method...
});
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment