protonet / jquery.inview

A jQuery plugin that adds a bindable 'inview' event for detecting when an element is scrolled into view.
blog.protonet.info/post/2516624585/jquery-inview-plugin
Do What The F*ck You Want To Public License
1.67k stars 488 forks source link

iPad Compatibility #17

Open louiswalch opened 11 years ago

louiswalch commented 11 years ago

The event doesn't fire until after scrolling has stopped on iPad, so elements don't fire as the user is scrolling down the page.

MuTLY commented 11 years ago

I think, for the moment, it’s not possible on iOS devices. iOS devices freeze DOM manipulation during scroll, queuing them to apply when the scroll finishes.

nicooprat commented 10 years ago

I know Skrollr uses a work around for this, it might interest you.

The solution consists in wrapping all your content in a specific div, then listening on the touchmove event on it as far as I remember.

joshribakoff commented 10 years ago

@MuTLY - yes it freezes some DOM manipulation. But this plugin isn't in the business of manipulating the DOM.

You can fix it so the event fires continuously during scrolling on iPad. Just bind to touchmove in addition to scroll. It's literally that simple.

As for users of jquery.inview who try to manipulate the DOM in response to these events, that's where you run into trouble.

MuTLY commented 10 years ago

I see. Thank you @nicooprat and @joshribakoff for the explanations.