开发者

how to modify slimbox to close by clicking on expanded image

开发者 https://www.devze.com 2023-02-21 10:34 出处:网络
I am using Slimbox 1.71 for MooTools 1.2 ( Demo ) I would like to close the expanded Image if I开发者_如何学Go click on the expanded image itself.

I am using Slimbox 1.71 for MooTools 1.2 ( Demo )

I would like to close the expanded Image if I开发者_如何学Go click on the expanded image itself.

How would I do that?


Modifying the core script is bad practice (say you update the script - you'll lose your changes). It's actually better to add a code snippet after the library is loaded, and operational:

document.id('lbImage').addEvent('click', function(){
    document.id('lbCloseLink').fireEvent('click');
});


Find:

id:"lbCenter"

Replace:

id:"lbCenter", events: {click: close}
0

精彩评论

暂无评论...
验证码 换一张
取 消