• Resolved jungalist

    (@jungalist)


    I am trying to override the double-tap behaviour of some mobile devices (mosdtly iphones) so that my image gallery lightboxes open on one click, but I am unsure what function to call in order to invoke the lightbox. I have the following:

    jQuery(‘.gallery-item a’).on(‘click touchend’, function(e) {
    var el = jQuery(this);
    var link = el.attr(‘href’);
    // the following redirects to a page, but I would like this to open the lightbox
    window.location = link;
    });

    What should I replace the window.location code with in order to make this happen?

    Thank you in advance

    https://www.ads-software.com/plugins/simple-lightbox/

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

    (@archetyped)

    Hi, manually invoking SLB is not currently supported, but I’ll keep it mind for a future update.

    You can take a look at init_items() in SLB’s lib.view.js for details on how SLB initializes event handling for links, but as this is an internal method, the implementation could change at any time.

Viewing 1 replies (of 1 total)
  • The topic ‘Invoke via code?’ is closed to new replies.