Created
April 3, 2014 14:43
-
-
Save codeBelt/9955653 to your computer and use it in GitHub Desktop.
jQuery Plugin with reference
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
| var PluginName = function(element) { | |
| this.element = element; | |
| }; | |
| PluginName.prototype.update = function() { | |
| }; | |
| $.fn.myPlugin = function() { | |
| this.myPluginId = 0; | |
| return new PluginName(this); | |
| }; | |
| var $myForm = $('el').myPlugin(); | |
| $myForm.update(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment