summaryrefslogtreecommitdiffstats
path: root/jquery-scrollspy.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery-scrollspy.js')
-rw-r--r--jquery-scrollspy.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/jquery-scrollspy.js b/jquery-scrollspy.js
index 5a4f189..7345496 100644
--- a/jquery-scrollspy.js
+++ b/jquery-scrollspy.js
@@ -12,6 +12,7 @@
min: 0,
max: 0,
mode: 'vertical',
+ namespace: 'scrollspy',
buffer: 0,
container: window,
onEnter: options.onEnter ? options.onEnter : [],
@@ -32,7 +33,7 @@
var inside = false;
/* add listener to container */
- $container.bind('scroll', function(e){
+ $container.bind('scroll.' + o.namespace, function(e){
var position = {top: $(this).scrollTop(), left: $(this).scrollLeft()};
var xy = (mode == 'vertical') ? position.top + buffer : position.left + buffer;
var max = o.max;