nicolas-t/Chocolat

Close Button does nothing

NorlanWaters opened this issue · 2 comments

Hi Nicolas,
first, thank you a lot for this awesome plugin!

I have one tiny problem with the close button on the overly. It's there, it triggers the pointer but it's doing nothing onclick. What could be the issue?
http://martinschneider-art.de/category/ikonen/ (klick on thumb)

Hello !

Congrats on the 100th issue !

In your chocolat javascript file a line is missing :
http://martinschneider-art.de/wp-content/themes/martin-schneider/js/jquery.chocolat.js?ver=5.1.1
line 491 you have :

$([this.elems.overlay[0], this.elems.close[0]])
    .off('click.chocolat')
    .on('click.chocolat', function() {
        
});

instead of :

$([this.elems.overlay[0], this.elems.close[0]])
.off('click.chocolat')
.on('click.chocolat', function() {
return that.close()
})

Worked! Thanks Nicolas! You're the best!