Created
April 21, 2010 14:13
-
-
Save roykolak/373852 to your computer and use it in GitHub Desktop.
This file contains hidden or 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($){ | |
jQuery.fn.mouseyDialog = function() { | |
// Classic Class Structure (note: no var, it's exposed for TDD) | |
MouseyDialog = function(element) { | |
// Constructor | |
} | |
MouseyDialog.prototype = { | |
sweetMethod: function() { | |
// Code | |
}, | |
sweetMethodAgain: function() { | |
// Code | |
}, | |
} | |
// jQuery Distribution | |
return this.each(function() { | |
new MouseyDialog(this); | |
} | |
} | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(function($){
jQuery.fn.mouseyDialog = function() {
// Classic Class Structure (note: no var, it's exposed for TDD)
MouseyDialog = function(anchor) {
this.anchor = $(anchor);
this.dialog = $(this.anchor.attr('href'));
this.button = $('close');
};
})(jQuery);