Permalink
Browse files

Add property active to settings object

  • Loading branch information...
Maximum Hallinan
Maximum Hallinan committed Mar 6, 2015
1 parent 15dc32c commit 9894d854077666f1f65ebc237ec10fadf2cadecb
Showing with 6 additions and 5 deletions.
  1. +6 −5 scrollTrigger.js
@@ -6,7 +6,8 @@
var settings = $.extend({
offset: 60,
target: this
target: this,
active: 'scrolltrig--active'
}, options),
el = this;
@@ -19,15 +20,15 @@
if(settings.target != el) {
if(sT > $(el[0]).offset().top - wH + settings.offset) {
$(settings.target).addClass('active');
$(settings.target).addClass(settings.active);
} else {
$(settings.target).removeClass('active');
$(settings.target).removeClass(settings.active);
}
} else {
if(sT > $(v).offset().top - wH + settings.offset) {
$(v).addClass('active');
$(v).addClass(settings.active);
} else {
$(v).removeClass('active');
$(v).removeClass(settings.active);
}
}

0 comments on commit 9894d85

Please sign in to comment.