Last active
August 29, 2015 13:56
-
-
Save mfrancois/9003066 to your computer and use it in GitHub Desktop.
Bootstrap Plugin jQuery
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($) | |
| { | |
| $.distExemple = function(element, options) | |
| { | |
| this.settings = $.extend(true, {}, $.distExemple.defaults, options); | |
| this.element = element; | |
| this.init(); | |
| } | |
| $.extend($.distExemple, | |
| { | |
| defaults: | |
| { | |
| }, | |
| prototype: | |
| { | |
| init: function() | |
| { | |
| this.initData(); | |
| this.initEvent(); | |
| }, | |
| initData: function() | |
| { | |
| }, | |
| initEvent: function() | |
| { | |
| } | |
| } | |
| }); | |
| $.fn.distExemple = function(options) | |
| { | |
| return this.each(function() | |
| { | |
| if (undefined == $(this).data('distExemple')) | |
| { | |
| $(this).data('distExemple', new $.distExemple(this, options)); | |
| } | |
| }); | |
| } | |
| })(jQuery); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title></title> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width"> | |
| <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script> | |
| <body> | |
| <div id="test"></div> | |
| <script type="text/javascript"> | |
| jQuery(document).ready(function(){ | |
| jQuery('#test').distExemple({ | |
| 'params1':true | |
| }); | |
| }); | |
| </script> | |
| <script type="text/javascript" src="js/distExemple.js"></script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment