Yu-Chieh’s Blog (Y.C. Chang)

Ruby on Rails / Rubygems / FullStack / Git / Mac notes.

How to Make Jquery Event Work in Rails App?

  • To make jquery event work, the easiest way is to use jquery.turbolinks.

  • To install it, just add this to your Gemfile:

1
2
3
4
5
6
7
gem 'jquery-turbolinks'

# and add this to your assets/javascripts/application.js file.

//= require jquery.turbolinks

# and it should be worked good.

done.

http://stackoverflow.com/questions/17881384/jquery-gets-loaded-only-on-page-refresh-in-rails-4-application

Comments