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

Double-clicking a link breaks things. #43

Open
ertyseidohl opened this issue Jul 3, 2012 · 1 comment
Open

Double-clicking a link breaks things. #43

ertyseidohl opened this issue Jul 3, 2012 · 1 comment

Comments

@ertyseidohl
Copy link

I've found that quickly double-clicking (i.e., clicking again after the lightbox has started to load) removes the background but not the lightbox itself.

Here is the code I'm using to show the lightboxes:

$('document').ready(function(){
    $('.lightbox_link').click(function(e){
        $('#' + $(this).attr('href')).lightbox_me();
        e.preventDefault();
    });
});

And here is the link:

<a id="admin" class="lightbox_link" href="lightbox_admin">Ask an Admin for Data</a>

I have a feeling that just making sure that the click-to-close listener on the background div isn't set until the lightbox is generated will fix this, but I'm not set up to do the fix myself right now.

Please message me if you need more details - I hope this helps, and thanks for doing Lightbox_me - it's super awesome!

@ertyseidohl
Copy link
Author

I've fixed this issue for myself by setting destroyOnClose to true, but the default settings are still annoying.

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

1 participant