• Resolved Finn

    (@phuc8509)


    Hello,
    I just want to know is there anyways we can disable Fancy Lightbox base on minwidth? I just want it active only with smaller 1024px responsive.
    Thanks for read and hope to see your respond.

Viewing 1 replies (of 1 total)
  • Plugin Author arisoft

    (@arisoft)

    Hello,

    Open “ARI Fancy Lightbox -> Settings -> Advanced” page and populate “Custom JS code” parameter with the following code:

    var onHandler = $.fn.on;
    $.fn.on = function() {
        if (arguments[0] == 'click.fb-start') {
            var args = Array.prototype.slice.call(arguments),
                oldHandler = args[2];
    
            args[2] = function(e) {
                if ($(window).width() > 1024) {
                    e.stopPropagation();
                    return ;
                }
    
                return oldHandler.call(this, e);
            };
    
            return onHandler.apply(this, args);
        }
    
        return onHandler.apply(this, arguments);
    };
Viewing 1 replies (of 1 total)
  • The topic ‘Disable Lightbox With MinWidth?’ is closed to new replies.