javascript - Disabling stellar.js on mobile -


i have built parallax scrolling site, i'm having trouble disabling stellar.js mobile devices. html , css okay i'm lacking in javascript , jquery knowledge. i've tried adding following start of main.js file:

function detectmob() {     if (window.innerwidth <= 768) {         stellaractivated = false;     } else {         stellaractivated = true;     } } 

can 1 show me how best go this?

thanks much.

you can download js or jquery regex code website - http://detectmobilebrowsers.com/

then include library in head section of project detect if requesting user agent mobile device or not. library provides bool property jquery.browser.mobile true if requesting device mobile device, can use this-

if(jquery.browser.mobile) {     stellaractivated = false; } else {     stellaractivated = true; } 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -