• HI,

    i use your plugin to add “lbp_secondary” to call lightbox plus plugin.
    This makes no sence on small screens.
    So it would be nice to have a option open in new window on mobile screen.

    or do not add “Add to class-attribute” on mobile

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Saleswonder Team Tobias

    (@tobias_conrad)

    Please in need this feature.

    Pi Zi

    (@freelancephp)

    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)

    Thread Starter Saleswonder Team Tobias

    (@tobias_conrad)

    thanks. happy baby time.

    Where to add this code?

    I am a newbee to jquery

    Pi Zi

    (@freelancephp)

    You can put it in a seperate javascript file and include it include it in your template.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘on mobile screen do not open in modal’ is closed to new replies.