Disable parallax in phones but keep the video
AhmedBadawy opened this issue · comments
Ahmed Badawy commented
Issue description:
I need to disable parallax on mobile phones but keep the video as background normal, I know there is an option to disable the video and keep the parallax.
jarallax(document.querySelectorAll('.jarallax'), {
disableVideo: /iPad|iPhone|iPod|Android/
});
but I want the opposite of that!
When I use disableParallax
it disables the video background too not the parallax only.
Version used:
1.12.0
Code to reproduce the issue (HTML blocks + JavaScript initialization)
<script src="https://unpkg.com/jarallax@1/dist/jarallax.min.js"></script>
<script src="https://unpkg.com/jarallax@1/dist/jarallax-video.min.js"></script>
<!-- Background YouTube Parallax -->
<div class="jarallax" data-jarallax-video="https://www.youtube.com/watch?v=ab0TSkLe-E0">
Your content here...
</div>
<!-- Background Vimeo Parallax -->
<div class="jarallax" data-jarallax-video="https://vimeo.com/110138539">
Your content here...
</div>
jarallax(document.querySelectorAll('.jarallax'), {
disableParallax: /iPad|iPhone|iPod|Android/
});