-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Events are getting registered before DOM load #90
Comments
Hi @praweb, thanks for submitting an issue to Oh, I see what's the problem. I'll try to fix this soon and ship the new version of the gem that adds event listeners after the DOM is loaded. Thank you for explaining the issue so well :) |
@nikolalsvk once lazy loaded is merged, I think we can simplify this as well. We don't have to add support for toggle Simply call |
Hey, @praweb! I've released 2.1.5 version of this gem that solves this issue. Can you check if it's working for you? |
Please excuse me, if I am trying this whole thing wrongly.
I have followed the documentation, and followed all the steps under Usage correctly, and can see the render_async working. But when I try to use toggle event, click action is not working.
Implemented toggle as below:
Can see the code generated as below:
But the issue happening is, this piece of code is running before DOM load, which technically mean the element with id
detail-button
is still available on the DOM, and so no event listener is being added to it.Is there a way to get this script executed after DOM is ready?
Thanks in advance.
The text was updated successfully, but these errors were encountered: