Created
December 6, 2012 05:37
-
-
Save Rafailong/4222035 to your computer and use it in GitHub Desktop.
jQuery plugin template.
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 ($) { | |
$.fn.pluginName = function (options) { | |
if (this.length > 1) { | |
this.each(function () { $(this).pluginName(options); }); | |
return this; | |
} | |
/* | |
private variables | |
var x = ... | |
*/ | |
var init = function () { | |
// init actions. | |
return this; | |
}; | |
/* | |
private function | |
var func = function .... | |
*/ | |
/* | |
public functions | |
this.public= function .... | |
*/ | |
return this.init(); | |
} | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment