[jQuery] Cannot get jquery to work
I downloaded the from http://docs.jquery.com/Downloading_jQuery#Download_jQuery
and store the script in public/javascripts/jquesry.js
I included the file using following command
<%= javascript_include_tag "jquery.js" %>
I want to add class to table class using following command inside
script tag.
(document).ready( function() {
$('tr:odd').addclass('odd');
$('tr:even').addclass('even');
alert("abc'); //for debugging
$('th').parent().addclass('table-heading');
}
);
But I cannot get the alert neither I can see the class in <tr> tag.
I am a newbie to rails.
any help is appreciated.
Thanks in advance
Thanks
Anil