diff --git a/server/files/javascript/library/waypoints.js b/server/files/javascript/library/waypoints.js index 567b05b8a..edda20a7d 100755 --- a/server/files/javascript/library/waypoints.js +++ b/server/files/javascript/library/waypoints.js @@ -554,10 +554,9 @@ https://github.com/imakewebthings/jquery-waypoints/blob/master/licenses.txt originalHandler = options.handler; options.handler = function(direction) { var $sticky, shouldBeStuck; - $sticky = $(this).children(':first'); shouldBeStuck = direction === 'down' || direction === 'right'; - $sticky.toggleClass(options.stuckClass, shouldBeStuck); + $wrap.toggleClass(options.stuckClass, shouldBeStuck); $wrap.height(shouldBeStuck ? $sticky.outerHeight() : ''); if (originalHandler != null) { return originalHandler.call(this, direction);