I have a parallax scrolling site that i do not want to work on iPad. So i want to remove the link to my parallax.js file when on iPad.
How would I disable parallax scrolling on detection of device ?
Any direction would be deeply appreciated.
I have a parallax scrolling site that i do not want to work on iPad. So i want to remove the link to my parallax.js file when on iPad.
How would I disable parallax scrolling on detection of device ?
Any direction would be deeply appreciated.
Use something like:
var is_ipad = navigator.userAgent.indexOf('iPad') > -1
Then dont attach the events that activate the parallax
Here's a thread that should allow you to catch other mobile devices: What is the best way to detect a mobile device in jQuery?
Here's a snippet, but don't ignore the many other useful responses:
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) ) {
// some code..
}