On Rails 4, AJAX in my pages are not being called because of turbolinks. The solution is to wrap the javascript code around the page load event. Got this solution from this post.
What works for me is this…
var ready = function() {
...your javascript goes here...
};
$(document).ready(ready);
$(document).on('page:load', ready);
No comments:
Post a Comment