From 17acc79307dd5357076195907464171449e2f674 Mon Sep 17 00:00:00 2001 From: Jared Smith Date: Mon, 8 Sep 2014 12:11:25 -0700 Subject: [PATCH 1/2] adds callback option --- jquery.fs.scroller.css | 2 +- jquery.fs.scroller.js | 2 +- jquery.fs.scroller.min.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.fs.scroller.css b/jquery.fs.scroller.css index 25f8b7d..1ac94d7 100644 --- a/jquery.fs.scroller.css +++ b/jquery.fs.scroller.css @@ -1,5 +1,5 @@ /* - * Scroller v3.0.4 - 2014-04-08 + * Scroller v3.0.4 - 2014-09-08 * A jQuery plugin for replacing default browser scrollbars. Part of the Formstone Library. * http://formstone.it/scroller/ * diff --git a/jquery.fs.scroller.js b/jquery.fs.scroller.js index 0a23fc6..a740225 100644 --- a/jquery.fs.scroller.js +++ b/jquery.fs.scroller.js @@ -1,5 +1,5 @@ /* - * Scroller v3.0.4 - 2014-04-08 + * Scroller v3.0.4 - 2014-09-08 * A jQuery plugin for replacing default browser scrollbars. Part of the Formstone Library. * http://formstone.it/scroller/ * diff --git a/jquery.fs.scroller.min.js b/jquery.fs.scroller.min.js index fe5620e..1752ced 100644 --- a/jquery.fs.scroller.min.js +++ b/jquery.fs.scroller.min.js @@ -1,5 +1,5 @@ /* - * Scroller v3.0.4 - 2014-04-08 + * Scroller v3.0.4 - 2014-09-08 * A jQuery plugin for replacing default browser scrollbars. Part of the Formstone Library. * http://formstone.it/scroller/ * From 48c6b22f09a6998e88f0716893223fb1fe0fe89c Mon Sep 17 00:00:00 2001 From: Jared Smith Date: Mon, 8 Sep 2014 12:18:07 -0700 Subject: [PATCH 2/2] adds callback function --- jquery.fs.scroller.js | 14 +++++--------- src/jquery.fs.scroller.js | 6 +++++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/jquery.fs.scroller.js b/jquery.fs.scroller.js index a740225..f8eedf4 100644 --- a/jquery.fs.scroller.js +++ b/jquery.fs.scroller.js @@ -1,11 +1,3 @@ -/* - * Scroller v3.0.4 - 2014-09-08 - * A jQuery plugin for replacing default browser scrollbars. Part of the Formstone Library. - * http://formstone.it/scroller/ - * - * Copyright 2014 Ben Plum; MIT Licensed - */ - ;(function ($, window) { "use strict"; @@ -24,7 +16,8 @@ duration: 0, handleSize: 0, horizontal: false, - trackMargin: 0 + trackMargin: 0, + callBack: 'scrolling' }; var pub = { @@ -286,6 +279,9 @@ var data = e.data; + data.sT = data.$content.scrollTop(); + data.$content.trigger(options.callBack); + if (data.horizontal) { // Horizontal var scrollLeft = data.$content.scrollLeft(); diff --git a/src/jquery.fs.scroller.js b/src/jquery.fs.scroller.js index f4266be..f8eedf4 100644 --- a/src/jquery.fs.scroller.js +++ b/src/jquery.fs.scroller.js @@ -16,7 +16,8 @@ duration: 0, handleSize: 0, horizontal: false, - trackMargin: 0 + trackMargin: 0, + callBack: 'scrolling' }; var pub = { @@ -278,6 +279,9 @@ var data = e.data; + data.sT = data.$content.scrollTop(); + data.$content.trigger(options.callBack); + if (data.horizontal) { // Horizontal var scrollLeft = data.$content.scrollLeft();