Title: Invoke via code?
Last modified: August 30, 2016

---

# Invoke via code?

 *  Resolved [jungalist](https://wordpress.org/support/users/jungalist/)
 * (@jungalist)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/invoke-via-code/)
 * 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://wordpress.org/plugins/simple-lightbox/](https://wordpress.org/plugins/simple-lightbox/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Archetyped](https://wordpress.org/support/users/archetyped/)
 * (@archetyped)
 * [10 years, 6 months ago](https://wordpress.org/support/topic/invoke-via-code/#post-6548260)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-lightbox.svg)
 * [Simple Lightbox](https://wordpress.org/plugins/simple-lightbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-lightbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-lightbox/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-lightbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-lightbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-lightbox/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Archetyped](https://wordpress.org/support/users/archetyped/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/invoke-via-code/#post-6548260)
 * Status: resolved