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
Wait for DOMContentLoaded event instead of checking for document.body #88
Conversation
Tested with those changes, it's working now. |
But another problem now execute if body tag contains many elements, not only fancybox. Clicks on any element in body throw an error |
Hi, I added event listener to |
Ok, thank you. Will check it tomorrow. |
Tested, without any other scripts on page it's working, but on real project it's not where there are many other scripts and JS libs.
Seams that there is a conflict with other libs. |
@shamarin Since I am not able to reproduce this issue, could you, please, share your page/demo so I could take a look? If you do not want to show your page publicly, you can contact privately, contact information is on the homepage. |
@shamarin Could you please try the latest version and see if it works better? |
Will try it today. |
Tested, the same error. |
With stable version there is no error now, but declarative method not working. |
Sorry, but since I can not reproduce that issue and you did not provide a live demo, I will not be able to make it work for you. |
Works for me now. Thanks @fancyapps ! |
document.body
might not yet be available during the load of the script (especially with the UMD version). So have to wait for it to become available.Fixes #81