-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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 firing twice or more #718
Comments
Interesting observation. I will look into it as soon as I get a chance. Thanks for letting us know. |
cool, If I find some free time I'll fix it too |
How can we test that these events are really firing more than once? |
It's a bit complicated but I can test it for you if you want . |
@almasaeed2010 |
Right |
lxsameer
added a commit
to Yellowen/AdminLTE
that referenced
this issue
Oct 11, 2015
This was referenced Oct 11, 2015
almasaeed2010
added a commit
that referenced
this issue
Oct 16, 2015
Sidebar autoclose on turbolinks fixed. close #718
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using Turbolinks jquery to with AdminLTE and after each request events handlers execute more than once. After some investigation I found out that you binds you
document
inside a$(function())
block. This is not a good idea generally and should we should avoid such mistakes. For instance, this example below can be a common occurrence and should be avoided:You should be binding your events outside a
$(function())
block. This will ensure that your events will only ever be bound once.The text was updated successfully, but these errors were encountered: