jquery - javascript not executed unless reloading page using turbolinks and rails 4 -
I followed it, but I think I can not load "saved token".
I think the problem is that when click on the 'edit' link (made by scaffold),
this does not trigger the preload function, you have problems in Rails 4 How to fix
my Coffeescript requirement css and js file I fix the bug with this solution but I do not understand why this works Is When turboLange is enabled, Instead of using Ajax to load only elements, instead of loading the entire new page for this reason, often the page does not load from the view of jQuery Your syntax with a little bit of View page < pre>
.form-inputs = f.input: name = F.input: content = f.text_field: user_tokens, data: {load: @ article.users}
$ (document) .ready - & gt; $ ('# Article_user_tokens') TokenInput '/users.json', subject: 'facebook', prePopulate: $ ('# article_user_tokens'). Data ('load')
* = token-input-focus // requires jquery.tokeninput
ready page: load
$ (document). "Ready Page: Load", - & gt; $ ('# Article_user_tokens') TokenInput '/users.json', subject: 'facebook', prePopulate: $ ('# article_user_tokens'). Data ('load')
$ (document). Already . See a great post about using .js in Railway 4.
$ (document). 'Ready, page: change' is often used as the option of
$ (document). On the page which is not being fully reloaded due to turbo-linux in Rail 4. I think that if you switch to it then your problem should be solved.
$ (document). On "Ready Page: Load" Problems are encountered while missing a comma between
Ready and
Pages and .
Comments
Post a Comment