Skip to content

Commit

Permalink
feat: trigger checkScroll on touchmove
Browse files Browse the repository at this point in the history
  • Loading branch information
sekimura committed Jun 11, 2014
1 parent 8133e0d commit 2f15560
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions jquery-scrolltofixed.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,12 @@
// the target element.
$(window).bind('scroll.ScrollToFixed', windowScroll);

// For touch devices, call checkScroll directlly rather than
// rAF wrapped windowScroll to animate the element
if ('ontouchmove' in window) {
$(window).bind('touchmove.ScrollToFixed', checkScroll);
}

if (base.options.preFixed) {
target.bind('preFixed.ScrollToFixed', base.options.preFixed);
}
Expand Down

0 comments on commit 2f15560

Please sign in to comment.