Eric P.
Forum Replies Created
-
Is there anyone that is able to help me QAQ ..or just some direction of suspicions for me to modify and test my site.
Thanks a lot!
Forum: Plugins
In reply to: [Firelight Lightbox] Make the iframe-popups open a new page at small screensAfter several experiments ..I finally got it!
1. Append target=”_blank” to all iframe-links.
2. Remove “fancybox-iframe” class at small screen devices.<script type="text/javascript"> var pixelRatio = window.devicePixelRatio || 1; if(window.innerWidth/pixelRatio < 641 ) { jQuery(document).ready(function(){ jQuery(".fancybox-iframe").removeAttr("class"); }); }; </script>
Tested successfully!
Forum: Plugins
In reply to: [Firelight Lightbox] Make the iframe-popups open a new page at small screensMany thanks for your help!
However, the page has 3 sorts of Easy-Fancybox links respectively as images, “fancybox-inline” and “fancybox-iframe”. Disabling the plugin at small screens affects the image gallery and inline-links as well.
So I come up with a thought that using script in the article and here is the code I use:
<script type="text/javascript"> var pixelRatio = window.devicePixelRatio || 1; if(window.innerWidth/pixelRatio < 641 ) { easy_fancybox_handler = function(){ jQuery("a.fancybox-iframe").attr("target","_blank"); }; }; </script>
But it still worked as disabling the plugin. Is is possible to detect link-type(fancybox-iframe) and override it like “easy_fancybox_handler = Null;”?