Are you sure you are not including prototype.js?

On Apr 29, 11:39 pm, Anil <[email protected]> wrote:
> <%= javascript_include_tag "jquery.js" %>
>
> I want to add class to table tag using following command  inside
> script tag.
> <script>
> (document).ready( function() {
>             $('tr:odd').addclass('odd');
>              $('tr:even').addclass('even');
>              alert("abc');                                           //
> for debugging
>              $('th').parent().addclass('table-heading');
>           }
>      );
>
> </script>
>
> CSS has all the tree class declared
> .odd {
>  background-color: #fcc;
>
> }
>
> .even {
>  background-color: #cef;
>
> }
>
> .table-heading {
>  font-size: 12px;
>
> }
>
> CSS is linked properly and if I add class manually I can see the
> stylesheet applied to the page.
>
> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to