Disable for small screens
-
I would like to disable Magnific Popup for screens smaller than a certain dimension so that mobile users will be linked to the actual file and be able to properly zoom-in on large images.
Any suggestions on how this might be possible? I found this post on Stackoverflow and someone posted this code:
https://stackoverflow.com/questions/12832831/lightbox-not-playing-nice-with-mobile-device$(document).ready(function() { // initialize the lightbox $('.fancybox').fancybox({ beforeLoad: function() { var windowsize = $(window).width(); // test the viewport size to see if it's smaller than 480px if (windowsize < 480) { // cancel the lightbox and load the link url $.fancybox.cancel(); } } }); });
Not sure if it’s possible to implement that code with this plugin.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Disable for small screens’ is closed to new replies.