My dev site uses a lot of Skrollr animations with a resolution of 1024 pixels and higher. Under 1024px, I don’t want the animation to be displayed, so I hid all the images and something else.
However, the javascript that is called to create the animation still causes lower permissions and causes some problems.
Is there a way to basically say: “If the resolution is less than 1024 pixels, ignore these JS files?”
I tried putting them in a DIV and using my existing multimedia CSS queries to display a "display: none" DIV in lower resolutions, but this does not work.
FYI, these are files that are called:
<script type="text/javascript" src="/js/skrollr.min.js"></script>
<script type="text/javascript" src="/js/homepageanimation.js"></script>
source
share