Open welyanto opened 7 years ago
Smth like this ?
$(window).bind('resize', function(e){ if (($(window).width() >= 1024)) { if (window.RT) clearTimeout(window.RT); window.RT = setTimeout(function() { $('.myclass').removeAttr("data-parallax"); }, 1); }
@friizu i'm not an expert javascript/jquery but what are you trying to accomplish there? seems there some missing brackets, i got an error on the scripts
Just add parallax-scroll as you normally would.
Create a CSS rule:
.no-transform{ transform:none; }
With jQuery:
if($(window).width() > 768){ $('.parallax-content-id').removeClass('no-transform'); }else{ $('.parallax-content-id').addClass('no-transform'); }
Hello, is it possible to disable temporarily only on mobile version, ex:
if(screen.width > 1024) { ParallaxScroll.init(); } else { $('.myclass').removeAttr("data-parallax"); }
how we can remove the data-parallax attribute temporarily and set it back once the screen width is more than 1024px? seems the ParallaxScroll.init() not trigger the removed attribute back. Any idea will be appreciated! Big Thanks :)