Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Popup Close button click event not working #390

Open
dipak24 opened this issue Apr 27, 2021 · 2 comments
Open

Popup Close button click event not working #390

dipak24 opened this issue Apr 27, 2021 · 2 comments

Comments

@dipak24
Copy link

dipak24 commented Apr 27, 2021

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');
});

@CDT-Nico
Copy link

Maybe like this:

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

@dipak24
Copy link
Author

dipak24 commented Apr 28, 2021

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');
});
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants