Created
August 9, 2013 14:48
-
-
Save andyhausmann/6194226 to your computer and use it in GitHub Desktop.
Revisions
-
andyhausmann created this gist
Aug 9, 2013 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ (function($){ "use strict"; $.pluginName = function(el, options){ var self = this; self.$el = $(el); self.el = el; self.$el.data('pluginName', self); self.init = function(){ self.options = $.extend({},$.pluginName.defaultOptions, options); // Initialization code goes here. }; // Example function //self.exampleFunction = function() { // Example function code goes here. //}; // Run initializer self.init(); }; $.pluginName.defaultOptions = { origin: 'auto', target: 'auto' }; $.fn.pluginName = function(options){ return this.each(function(){ (new $.pluginName(this, options)); // Want to let your plugin do even more? Put it here. }); }; })(jQuery);