Looking for a really simple way in jQuery to add a class to a TD when it has the rowspan attribute.
Any ideas?
Looking for a really simple way in jQuery to add a class to a TD when it has the rowspan attribute.
Any ideas?
I think this would work:
$('td[rowspan]').addClass('className');
This uses the Has Attribute selector.
jQuery(function(){
jQuery('td[rowspan]') //select all TD's with attribute=rowspan
.addClass('class_name'); // now add class to them
});
//