Turbolinks prevents normal $(document).ready() events from firing on all page visits besides the initial load, as discussed here and here. None of the solutions in the linked answers work with Rails 5, though. How can I run code on each page visit...
I'm trying to make a JS snippet work in a concrete page with Rails 4 and Turbolinks. I've tried with the standard solution:  <script type="text/javascript">      var ready = function() {         // Bla bla     };      $(document...
I'm building my first Ruby on Rails application and I tried to create an animated navigation bar. I'm using jQuery and turbolink.  This is my application.js (under /app/assets/javascripts)  $(document).ready(function(){   $("#nav").ho...
I have been working on this for almost a day now and cant figure out how to make addthis work wtih turbolinks and rails 4. my add this code is     <script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js">&l...
I've included Highcharts in a simpler Rails Application and it works just fine.  but when I did the same thing in a more complex Rails Application the Javascript code the Chart is not showing up.  here's what I did so far:  Gemfile   gem "...
Rails 4.2.0, turbolinks (2.5.3) jquery-rails (4.0.3), jquery-ui-rails (5.0.3) sorttable.js App used on Chrome, Firefox, and IE   WHAT SHOULD HAPPEN: Whether a redirect, render, or just clicking to a new page in the app, any table with class sorttabl...
This question might sound similar to Rails turbolinks long request doesn't show page load.  I've recently started new Rails 4 application, which uses Turbolinks library by default - it is awesome: makes the application feel faster/snappier, h...
I have a Javascript, which should work on $(document).ready but it won't, because I also have to use turbolinks.  Is there a way to disable it for this script? Or at least, is there a way to disable it for the view, I want my script to work on?...
I'm trying to integrate jQuery UI Autocomplete in my Rails 4.0 application like described in this Railscast: 102-AutoCompleteAssociationRevised.  Unfortunately, the autocompletion doesn't work. I don't get any suggestions although the ren...
I have the following:  $ ->     $('[data-provider="summernote"]').each ->       $(this).summernote         height: 300   And this works, however, I would like to make it TurboLinks 5 friendly.  So I tried the following:  $ ->...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.