How to change slimbox to close by clicking on the expanded image

I am using Slimbox 1.71 for MooTools 1.2 ( Demo )
I would like to close the expanded image if I click on the extended image.

How can I do it?

+4
source share
2 answers

Modifying the script kernel is bad practice (let's say you update the script - you will lose your changes). In fact, it’s better to add a piece of code after loading the library and work:

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

To find:

 id:"lbCenter" 

Replace:

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

Source: https://habr.com/ru/post/1346405/


All Articles