Closed Achtel closed 8 years ago
Just use a normal jquery event to catch it, a global listener is probably easiest.
.delegate() worked where .on() wouldn't. Thanks for the hint.
$(document).delegate(".delete-image", "click", function() {
console.log("button clicked woohoo");
});
Sorry to ask another daft question - I've implemented the delete method now which is all working fine: user clicks on the image, modal pops up with button, user clicks button, method is invoked, image gets deleted - last thing I want to do on successful delete is close the modal but how can I invoke the .close() function / which element do I grab?
$('.ekko-lightbox').close() doesn't work...
First image under http://ashleydw.github.io/lightbox/#navigateTo
Look at the page source for closeit
Worked, thanks again for the hint.
I've added a delete icon to the data-footer attribute which renders just fine but I'm now struggling to figure out how to capture the click event from it.
I'm using this within a Meteor app so I had hoped I could use a template event but that doesn't seem to fire.
Any pointers as to how I could achieve this?