Browse Source

Fix load events to also work on turbolinksed pages

Maarten van den Berg 8 years ago
parent
commit
ed86200dfc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/assets/javascripts/buttonhandlers.js

+ 1 - 1
app/assets/javascripts/buttonhandlers.js

1
 // Provides handlers for the buttons!
1
 // Provides handlers for the buttons!
2
 
2
 
3
-$(setup_handlers);
3
+document.addEventListener("turbolinks:load", setup_handlers);
4
 
4
 
5
 // Add the presence handler to all buttons on the page
5
 // Add the presence handler to all buttons on the page
6
 function setup_handlers()
6
 function setup_handlers()