-
Notifications
You must be signed in to change notification settings - Fork 65
Events firing twice or more #46
Comments
yes, keep in mind that anything you call in You need to do either one of these: a. Unbind the functions before binding them, or Perhaps you can split your App.Supertestes.bindFunctions();
$(document).ready(function () {
App.Supertestes.initOtherThings();
}); |
How, to write this code with CoffeeScript.
I see count multiple time and this increases every time i click my Home button. |
Plz, help me this behaviour stops me working on some of the functionality for my website. |
You'll need to un-initialize chosen somehow. Perhaps chosen isn't compatible with Turbolinks. |
Hi, I'm also having this issue. Before I implemented the jquery-turbolinks , this responsive navigation menu wich changes the horizontal menu in a dropdown menu for mobile screens was working fine:
now, when clicking the menu in dropdown mode, it drops down and pulls up a couple of times and then stays pulled up. This behaviour can be checked here: how can I fix this? thanks for your help, Anthony |
I added the unbind() method to the menuToggle element, and the issue seems fixed now:
|
As far as I can see, this issue is caused by the JS being within the page rather than in an external file. If you'll put this JS on one single page: <script type="text/javascript">
$(function() {
alert('hiii')
});
</script> And navigate to that page, you'll obviously see the When you go to the page with that JS again, you now see two alerts and so on. So there's nothing to do with idempotency. And as far as I can see, the The only workaround I can see ATM is to move that JS into a separate file, which is a bit of a shame for small bit of initialiser code. Can you confirm this? Is it misused or that's an actual issue? |
i have a ready() function that is fired when page loads normally, and when turbolinks loads a page $(document).ready(ready); With this configuration the ready function fires once per page load, in any other turbolinks apps. |
I read troubleshooting section but I got this problem:
I'm using the gem but the event is trigged twice or more. What is wrong? Do use the listeners inside App object is wrong?
The text was updated successfully, but these errors were encountered: