Quantcast
Channel: Topic Tag: mobile | WordPress.org
Viewing all articles
Browse latest Browse all 22105

RavanH on "[Plugin: Easy FancyBox] Disable fancybox for smalll screens"

$
0
0

@emj
Supposing you are talking about image links, not about other media, then try:

<script type="text/javascript">
var pixelRatio = window.devicePixelRatio || 1;
if(window.innerWidth/pixelRatio < 641 ) {
    easy_fancybox_handler = function(){
        var fb_IMG_select = 'a[href*=".jpg"]:not(.nofancybox), area[href*=".jpg"]:not(.nofancybox), a[href*=".jpeg"]:not(.nofancybox), area[href*=".jpeg"]:not(.nofancybox), a[href*=".png"]:not(.nofancybox), area[href*=".png"]:not(.nofancybox);
        jQuery(fb_IMG_select).attr('target','_blank');
    };
};
</script>

Viewing all articles
Browse latest Browse all 22105

Trending Articles