Ah, I found my mistake!!!
I was just only adding JQuery in my view with <%=
but not in my application.html.erb. That means that the code in the
application.js had propably no JQuery access!
Ok remove this
google to your Gemfile and at this
then in the console
this will install jquery the right way
then go to
config/application.rb and verify that :defaults is made up of this
this like here is what tells rails what to output in the
now jquery is set up.
My problem now is that my other normal Rails Java Helpers (see
below )are not working anymore as intended!
<%= button_to ‘Destroy’, product, :confirm => ‘Are you sure?’, :method
=> :delete %>
That one is wotking, but there is no confirm pop up!!!
Is possible that you are have installed prototype which has similar syntax to that of jquery.
Now what version of rails are you using, this helper changed their out put in rails 3.x+ from that found in rails 2.x-.
I read something about JRails. Is that an option or is there another
read this also:
as you can see that is a bit long, also if it were a class you would have to do this
and if you have to capture a tag type
so many libraries have a function that replaces this with $( ) where $ is the name of the function. In jquery you distinguish what is that you want to capture by addin a #, a . or nothing.
the result is :