jsor / lity

Lightweight, accessible and responsive lightbox.
https://sorgalla.com/lity/
MIT License
1.16k stars 196 forks source link

Template option with Programatic event handler #228

Open elixirgraphics opened 5 years ago

elixirgraphics commented 5 years ago

Is there a way to pass a custom template when calling Lity as a programatic event handler?

I was hoping something like this would work, but I cannot seem to get it to work:

  $(document).on('click.lity', '#lity-target',  {
      esc: false,
      template: 'INSERT CUSTOM TEMPLATE HERE'
  }, lity);
impactcolor commented 5 years ago

click.lity?

naton commented 5 years ago

If I’m not mistaken the template is rendered (and hidden) on page load so I don’t think that’s possible.