javascript - Momentum Scrolling Breaks jQuery scroll event listener -
im having issue setting momentum scrolling on web app seems break jquery scroll event listener.
here css:
html, body { height: 100%; overflow-y: scroll; -webkit-overflow-scrolling: touch; }
here javascript:
$(window).scroll(function (event) { alert('im scrolling!'); });
the above css allows momentum scrolling on iphone.
problem:
the jquery event listener not firing "overflow-y: scroll" on html,body.
removing "overflow-y: scroll" html,body allows js scroll event fire, momentum scrolling lost on iphone.
attempted solutions:
having searched solutions found topic: overflow-x: hidden breaking jquery scroll event says removing "height: 100%" html,body allow js scroll event fire. doing fire event loose momentum scrolling once again.
summary:
above css rules give momentum scrolling break jquery scroll event listener. removing of css rules html,body allows jquery scroll event fire momentum scrolling lost.
how can keep momentum scrolling , allow scroll event fire?