Triggering a lightbox with a button

You can also create your lightbox somewhere and create a button as well. Add a unique name for the lightbox image and for the button. Then add the following script to the Custom Code Footer section:

$(document).ready(function() {
  $('#lightbox-unique-id').click(function(e) {
    e.preventDefault();
    $('#button-unique-id').trigger('tap');
  });
});
2 Likes