I recently updated jQuery from 1.8 to 2.1. I suddenly discovered that the .live()
stops working.
I get the error TypeError: $(...).live is not a funct
If you happen to be using the Ruby on Rails' jQuery gem jquery-rails
and for some reason you can't refactor your legacy code, the last version that still supports is 2.1.3
and you can lock it by using the following syntax on your Gemfile
:
gem 'jquery-rails', '~> 2.1', '= 2.1.3'
then you can use the following command to update:
bundle update jquery-rails
I hope that help others facing a similar issue.