Is there a way to write data: {turbolinks: false} a million times? Is it a rail turbine?

turbolinks (5.0.0)
Rails 4.2.2

Is there DRY to do each link_to in your application data: {turbolinks: false}? or does it rob the target of Turbolinks and suggest that it just needs to be removed?

A large number of my jquery scripts will not work correctly if I click on the link if it does not contain data: {turbolinks: false }, the scripts will work correctly when the page is reloaded.

I have my jquery wrapped in: $(document).on('turbolinks:load', function () { #something here});

0
source share
1 answer

, , , " ?" , ...

, turbolinks: false , , Turbolinks. , , , Turbolinks . , .

, , :

" jQuery ? , Turbolinks".

, jQuery $, DOMContentLoaded. Turbolinks ( Turbolinks-Classic page:load... Turbolinks 5 turbolinks:load, , reset.

, JavaScript, .

Turbolinks, , , Nate Berkopec 100 Turbolinks. , Turbolinks - .

+1

Source: https://habr.com/ru/post/1665275/


All Articles