Thursday, 3 September 2015

How to change specific column of a table using CSS/Jquery

Using CSS:

table tr td:first-child + td + td {...} /* third column */
table tr td:first-child + td + td + td {...} /* fourth column */
table tr td:first-child + td + td + td +td {...} /* fifth column */

Using Jquery:

$(function() {
$('td:first-child').addClass("firstChild");
$(".table-class tr").each(function() {
$(this).find('td:eq(1)').addClass("secondChild");
$(this).find('td:eq(2)').addClass("thirdChild");
});
});

No comments:

Post a Comment

Extracting Nupkg files using command line

Rename it to zip first then extract files as below 1.     Rename-Item -Path A_Package.nupkg -NewName A_Package.zip 2.     Make sure to repla...