Skip to content

Instantly share code, notes, and snippets.

@whatupdave
Created August 23, 2009 05:04
Show Gist options
  • Save whatupdave/173165 to your computer and use it in GitHub Desktop.
Save whatupdave/173165 to your computer and use it in GitHub Desktop.
jQuery plugin
(function($) {
$.fn.present = function(options) {
var self = this;
options = $.extend({
// defaults
}, options);
$.extend(this, {
clicked: function(e) {
// ...
}
});
return this.each(function() {
$(this).addClass('present');
});
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment