brutaldesign/swipebox

Popup Close button click event not working

Opened this issue · 2 comments

Hello developers,

I try to add click event on the close button over the swipebox-overy but I can't fix anybody help how to add my custom event on there

My code is:
jQuery(document).on('click', '#swipebox-close' , function() {
jQuery(body).css('color', 'red');
});

Maybe like this:

jQuery('#swipebox-close').bind( action, function( event ) { jQuery(body).css('color', 'red'); });

Hello CDT,
Thank you very much for your reply.
I already tried this code but this was not working for me, I think the problem is when I click over the image that time only overlay and close buttons added so document dom does not find #swipebox-close id on the dom.

Do you have any alternative solution for this type of issue?
my website link is: https://drkiranthapa.com.au/

my code:
jQuery(document).ready(function($){
$('#swipebox-close').bind( 'click, hover', function( event ) {
console.log(event);
alert('Hello ');
$(body).css('color', 'red');
});
});