Skip to content

Commit

Permalink
Changed plugin setup to use RequireJS if present
Browse files Browse the repository at this point in the history
  • Loading branch information
u-quark committed Jul 1, 2014
1 parent a2962ad commit b04fe1d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions js/uncompressed/jquery.mCustomScrollbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@ the production-ready jquery.mCustomScrollbar.concat.min.js which contains the pl
and dependencies (minified).
*/

;(function($,window,document,undefined){
;(function(window,document,undefined){

(function(init) {
if (typeof define === 'function' && define.amd) {
define(['jquery', 'jquery-mousewheel'], init);
} else {
init(jQuery);
}
}

(function($){

/*
----------------------------------------
Expand Down Expand Up @@ -2077,5 +2087,5 @@ and dependencies (minified).
$(window).load(function(){
$(defaultSelector)[pluginNS](); /* add scrollbars automatically on default selector */
});
})(jQuery,window,document);

}))}(window,document));

0 comments on commit b04fe1d

Please sign in to comment.