A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Modifying table row attributes using Javascript

Here is a quick and simple tutorial to modify table row attributes. The tutorial assumes that you already have a class assigned for the TR tag – let’s say you are trying to do a zebra-style table where each row has a different color.

In my case, I tried to assign a class to the TD, but it won’t work because the class from the TR prevails in some browsers – and yes, I am no CSS expert. So, I came up with this solution to solve my problem.

This entry was posted in General and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>