Turbolinks and javascript plugins in rails

98 views Asked by At

I use javascript plugin, that converts couple of inputs to custom star rating picker. So, when turbolinks enabled and i use link_to to navigate to another page, javascript is not working (inputs displaying like standard ones).

Script.js

eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+ ...

How can i solve this problem? Tried to attach some method on page load and etc., but no result.

1

There are 1 answers

0
Src On

Solved using:

$(document).on("page:change", function() { code here });