tags:

views:

15

answers:

2

Looking for a really simple way in jQuery to add a class to a TD when it has the rowspan attribute.

Any ideas?

+1  A: 

I think this would work:

$('td[rowspan]').addClass('className');

This uses the Has Attribute selector.

Jeremy
A: 
jQuery(function(){      
              jQuery('td[rowspan]')      //select all TD's with attribute=rowspan
              .addClass('class_name');   // now add class to them
});

//

Praveen Prasad