Closed AMDesign-1 closed 9 years ago
Hello and thank you for your feedback. Im activly working on the next version of this plugin and adding an option to determine a slideup handler. With this you can control which element should be able to toggle the body.
In the meantime you can add an click event handler to your gallery image/button etc... to prevent the click event from bubbling up the DOM tree. I think this link is helpfull http://api.jquery.com/event.stoppropagation/.
Stay tuned ;).
Great, cant wait to see the next version! Thanks for the tip!
In case someone comes across this issue ill write down what I did.
I am using Blueimp Gallery
And added the code below:
<script>
$(document).ready(function() {
document.getElementById('links').onclick = function (event) {
event.stopPropagation();
event = event || window.event;
var target = event.target || event.srcElement,
link = target.src ? target.parentNode : target,
options = {index: link, event: event},
links = this.getElementsByTagName('a');
blueimp.Gallery(links, options);
};
});
</script>
Thanks, i appreciate this.
Thank you so much for the script it works great and from my testing scales very well. I have one issue, when I put a gallery lightbox inside a collapse-card and then i click it, it opens the gallery lightbox perfect but it closes collapse card. Anyway to have it ignore just the gallery image? Or perhaps a better way to do that?