简体   繁体   中英

Turbolinks and javascript plugins in rails

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.

使用以下方法解决:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM