Quantcast
Viewing all articles
Browse latest Browse all 22091

freelancephp on "[Plugin: WP External Links (nofollow new window seo)] on mobile screen do not open in modal"

You could solve this outside the plugin. Just create a javascript to detect the users screen width. If it's smaller then f.e. 420px remove the "lbp_secondary" class and set the target to open in a new window.

Example with jQuery:

jQuery(function ($) {
    // detect browser width
    if ($(window).width() <= 480) {
        $lbItems = $('.lbp_secondary');

        // open lightbox items in new window
        $lbItems.attr('target', '_blank');

        // remove lightbox class
        $lbItems.removeClass('lbp_secondary');
    }
});

(I haven't tested it yet)


Viewing all articles
Browse latest Browse all 22091

Trending Articles