ostinred ostinred - 29 days ago 14
Javascript Question

How to disable parallax wagerfield on small resolution?

I use this parallax, but can't disable it on mobile?

I found some methods like this:

scene = $('#scene').parallax();
scene.parallax('disable');


But it didn't work. Can anybody help?

Answer

I would rather go in different direction. Instead of making something disable on small screens make it working only on larger devices:

if ($(window).width() > 640) { //set up breaking point

    $('#scene').parallax(); // this or any other code you need

}