diff --git a/jquery.jscroll.js b/jquery.jscroll.js index 054c531..e1cb306 100644 --- a/jquery.jscroll.js +++ b/jquery.jscroll.js @@ -8,8 +8,16 @@ * @version 2.3.7 * @requires jQuery v1.4.3+ * @preserve + * @Supports AMD pattern */ -(function($) { +(function($, factory){ + 'use strict'; + if (typeof define === 'function' && define.amd) { + return factory($); + } else { + window.jScroll = factory($); + } +})(jQuery || null, function($) { 'use strict'; @@ -224,4 +232,6 @@ }); }; -})(jQuery); \ No newline at end of file + return jScroll; + +}); \ No newline at end of file