Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将 Slimbox 1.71 用于 MooTools 1.2(演示) 如果单击展开的图像本身,我想关闭展开的图像。
我该怎么做?
修改核心脚本是不好的做法(比如你更新了脚本——你会丢失你的更改)。实际上最好在库加载后添加代码片段,并且可以操作:
document.id('lbImage').addEvent('click', function(){ document.id('lbCloseLink').fireEvent('click'); });
寻找:
id:"lbCenter"
代替:
id:"lbCenter", events: {click: close}