点按不带<a> element

时间:2018-01-08 01:21:25

标签: featherlight.js

Is there a way to get featherlight.js to trigger on an image itself, as opposed to a surrounding link?

For example, I'm trying this:

$('img.pop').featherlight($(this));

But getting an error:

a.cloneNode is not a function

1 个答案:

答案 0 :(得分:0)

应该不是问题。问题可能是上面代码中的this。这就是为什么我向任何报告问题的人提出的建议是制作一个有效的例子。