Skip to content

Commit d23197a

Browse files
committed
Fire afterScroll callback even if window can't scroll
1 parent 16c8d29 commit d23197a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jquery.smooth-scroll.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,11 @@ $.smoothScroll = function(options, px) {
184184
aniOpts.step = opts.step;
185185
}
186186

187-
$scroller.stop().animate(aniProps, aniOpts);
187+
if ( $(document).height() > $(window).height ) {
188+
$scroller.stop().animate(aniProps, aniOpts);
189+
} else {
190+
opts.afterScroll.call(opts.link, opts);
191+
}
188192
}
189193
};
190194

0 commit comments

Comments
 (0)