isClickableElement
function
Default value:
isClickableElement: function(el) {
return el.tagName === 'A';
}
Function should check if the element (el
) is clickable. If it is – PhotoSwipe will not callpreventDefault
and click
event will pass through. Function should be as light is possible, as it's executed multiple times on drag start and drag release.
如下设置即可
// define options (if needed)
var options = {
isClickableElement : function(el){
return true;
}
};