summaryrefslogtreecommitdiffstats
path: root/jquery-scrollspy.js
diff options
context:
space:
mode:
Diffstat (limited to 'jquery-scrollspy.js')
-rw-r--r--jquery-scrollspy.js17
1 files changed, 2 insertions, 15 deletions
diff --git a/jquery-scrollspy.js b/jquery-scrollspy.js
index 46b5078..8f0a733 100644
--- a/jquery-scrollspy.js
+++ b/jquery-scrollspy.js
@@ -21,23 +21,8 @@
onTick: options.onTick ? options.onTick : []
}
- // Here's a 'best' approach for overriding 'defaults' with specified options.
- // Note how rather than a regular defaults object being passed as the second
- // parameter, we instead refer to $.fn.pluginName.options explicitly, merging it
- // with the options passed directly to the plugin. This allows us to override
- // options both globally and on a per-call level.
-
var options = $.extend( {}, defaults, options );
- var init = function(){
-
- }
-
- var processScroll = function(){
-
-
- }
-
return this.each(function (i) {
var element = this;
@@ -83,7 +68,9 @@
if(inside){
inside = false;
leaves++;
+ /* trigger leave event */
$(element).trigger('scrollLeave', {position: position, leaves:leaves})
+
if($.isFunction(o.onLeave)){
o.onLeave(element, position);
}