Answer the question
In order to leave comments, you need to log in
Set up blueimp-gallery together?
Hello!
There is a script for viewing pictures in the blueimp-gallery gallery. Here is the script that is applied to the gallery with id="gallery".
document.getElementById('gallery').onclick = function (event) {
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);
};
document.getElementsByClassName('gallery')[0].onclick = function (event) {
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);
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question