From 9bc4b1b700d4af8b1731ecafbf2a30c34652c1b9 Mon Sep 17 00:00:00 2001 From: Rahul Pal Date: Wed, 15 Feb 2017 11:08:58 +0530 Subject: [PATCH 1/2] Added AMD Support --- jquery.jscroll.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/jquery.jscroll.js b/jquery.jscroll.js index 054c531..db975d0 100644 --- a/jquery.jscroll.js +++ b/jquery.jscroll.js @@ -8,8 +8,15 @@ * @version 2.3.7 * @requires jQuery v1.4.3+ * @preserve + * @Supports AMD pattern */ -(function($) { +(function($, factory){ + if (typeof define === 'function' && define.amd) { + return factory($); + } else { + window.jScroll = factory($); + } +})(jQuery || null, function($) { 'use strict'; @@ -224,4 +231,6 @@ }); }; -})(jQuery); \ No newline at end of file + return jScroll; + +}); \ No newline at end of file From fe1b210d39f6b9f4e91a8dd5515b828276cfcad9 Mon Sep 17 00:00:00 2001 From: Rahul Pal Date: Wed, 15 Feb 2017 11:15:33 +0530 Subject: [PATCH 2/2] Added AMD Support --- jquery.jscroll.js | 1 + 1 file changed, 1 insertion(+) diff --git a/jquery.jscroll.js b/jquery.jscroll.js index db975d0..e1cb306 100644 --- a/jquery.jscroll.js +++ b/jquery.jscroll.js @@ -11,6 +11,7 @@ * @Supports AMD pattern */ (function($, factory){ + 'use strict'; if (typeof define === 'function' && define.amd) { return factory($); } else {