|
|
@ -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); |
|
|
|