Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

please support turbolinks5 thanks ! #61

Open
FingersKey opened this issue May 14, 2016 · 17 comments
Open

please support turbolinks5 thanks ! #61

FingersKey opened this issue May 14, 2016 · 17 comments

Comments

@FingersKey
Copy link

No description provided.

@Argonus
Copy link

Argonus commented Jul 1, 2016

@kossnocorp Any news about this issue ;) ?

@tagliala
Copy link

tagliala commented Jul 2, 2016

duplicate of #56

@mahendhar9
Copy link

Meanwhile, try this
$(document).on('turbolinks:load', function() {
...your javascript goes here...
});

@Lowryderch
Copy link

Here is my solution:

  1. install gem 'jquery-turbolinks'
  2. add this .coffee file to your app: https://github.com/turbolinks/turbolinks/blob/master/src/turbolinks/compatibility.coffee
  3. name it turbolinks-compatibility.coffee
  4. at application.js
    //= require jquery
    //= require jquery_ujs
    //= require jquery.turbolinks
    //= require turbolinks
    //= require turbolinks-compatibility

@nchatu
Copy link

nchatu commented Sep 22, 2016

Lowryderch's steps worked for me expect I didn't want to add jquery.turbolinks

@adeeb1
Copy link

adeeb1 commented Sep 25, 2016

@Lowryderch Would it be possible to make a JavaScript version of your script, please?

JunichiIto added a commit to rubyist-connect/rubyist-connect that referenced this issue Oct 1, 2016
@tacoplz
Copy link

tacoplz commented Oct 4, 2016

Had this problem for about a day, this solution worked great, thanks so much @Lowryderch!

@ChaosPredictor
Copy link

Thanks @Lowryderch it's work for me as well, but with some side effects. I have now 2 superfish span.sf-sub-indicator images after refresh. And after using of link_to I'm stay just with one (as should be). Maybe you have any Idea why is it like this?

@UsinaSites
Copy link

UsinaSites commented Oct 11, 2016

Hi @ChaosPredictor, I got more or less the same issue, after the second click, my assets are executed twice (as you can see on that screenshot: https://postimg.org/image/fuest7qjx/). Did you solve your problem ?

@ChaosPredictor
Copy link

Hi @UsinaSites, I just remove the element. it's not kind of solution the work for you

@vijay-ror-dev
Copy link

Thanks @Lowryderch it's work for me as well.

@AndrewSouthpaw
Copy link

AndrewSouthpaw commented Dec 16, 2016

@adeeb1 I created one here: https://gist.github.com/AndrewSouthpaw/5a3144d9b2ed5334e0ada83a78ace42d

Using it:

import jQueryTurbolinksCompatibility from './jquery-turbolinks-compatibility'
jQueryTurbolinksCompatibility()

@adeeb1
Copy link

adeeb1 commented Dec 19, 2016

@AndrewSouthpaw Thanks a lot! It seems your script requires the use of ES6?

@AndrewSouthpaw
Copy link

Yeah. It would require only minor modifications to make it work for ES5.

@andreaslillebo
Copy link

Thanks @Lowryderch. This works perfectly. If anyone are having trouble with this, make sure your application.js is like this:

//= require jquery
//= require jquery_ujs
//= require jquery.turbolinks
//= require turbolinks
//= require turbolinks-compatibility
other scripts...

and not something like:

//= require jquery
//= require jquery_ujs
//= require jquery.turbolinks
other scripts...
//= require turbolinks
//= require turbolinks-compatibility

JunichiIto added a commit to JunichiIto/turbolinks-4-1-sandbox that referenced this issue Apr 14, 2017
@waleedarshad
Copy link

screenshot from 2017-06-04 12 38 19

@waleedarshad
Copy link

Can anybody tell me why i am receiving this error?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests