The $(this) attribute does not work in connection with the waypoints.js.
My Javascript:
$('.dipper').waypoint(function() {
$(this).addClass('test');
}, { offset: '100%' });
The strange thing is that this Code is working very well on my website:
$('.dipper').waypoint(function() {
$('.dipper').addClass('test');
}, { offset: '100%' });
In this case I am using .dipper
instead of $(this)
. You can check it out on my website: http://www.sq-media.de/weboptimierungen/rehfeld
The waypoint method does not run with the same context as the parent jQuery object. If you need this behaviour, you could use
each
to iterate over the.dipper
elements: