i have the following jquery code to format a html table.
$(".jtable td").each(function() {
$(this).addClass("ui-widget-content");
});
i want (one on table) to change the text color to blue (its black in the ui-widget-content class. i tried doing this below but it didn’t seem to do anything.
Any help on override some particular css for one table (and i want to leave the other tables alone)
$(".jtable td").each(function() {
$(this).addClass("ui-widget-content");
$(this).css("color", "Blue");
});
That selector:
Selects a table-cell that’s a descendant of an element of class ‘jtable’.
What you’re presumably trying to do is select a
tablewith that class:This will, of course, select all tables of that class. So you’d need to be able to uniquely identify the table you want to select/address. If it’s the first table:
Otherwise you’d likely have to apply an
idto the one you want to modify.