summaryrefslogtreecommitdiffstats
path: root/jquery-scrollspy.js
diff options
context:
space:
mode:
authorSam Alexander <sxalexander@gmail.com>2011-10-10 17:00:08 -0700
committerSam Alexander <sxalexander@gmail.com>2011-10-10 17:00:08 -0700
commitb0537c1ad65cb6f270506c88baf800e1ff193e68 (patch)
treec239fd9e5baed604670d5e0c80a636a3941c92f6 /jquery-scrollspy.js
parent482d819f8fece21218a3c7b544c424aec2e5a162 (diff)
downloadjquery-scrollspy-b0537c1ad65cb6f270506c88baf800e1ff193e68.zip
jquery-scrollspy-b0537c1ad65cb6f270506c88baf800e1ff193e68.tar.gz
jquery-scrollspy-b0537c1ad65cb6f270506c88baf800e1ff193e68.tar.bz2
removing extra boilerplate
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);
}