Jquery doesn't work with jquery-rails gem
I did bundle and generate install and now I have the jquery's files instead of prototype
I can see from mozilla firebug that the jquery's files are included, however I can't use jQuery or $ functions, the app/mozilla console don't know them.
Any suggestions how to fix this?
I'开发者_运维百科m using jquery-rails 1.0.12 and rails 3.0.8
It would be great if you could give more details but here are some things you can try:
Make sure that when you view the page source you can see the jQuery files are included. I usually have
<%= javascript_include_tag :defaults %>
between the HEAD tagsYou can test if everything is working by adding the following code:
$(document).ready(function() { alert('hello world'); });
Hope this helps
Make sure the line below is commented out (in application.rb) and that you have restarted your server.
精彩评论