I have one table with some data. After some event I want to highlight column.
jQuery('#tableFilter td:eq(2)').each(function(){
jQuery(this).css('background-color','#cc0');});
But It highlight only one cell even I have used each function.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your selector says “Of all the
<td>elements inside#tableFilter, consider only the 3rd one”, rather than “Take the 3rd<td>in each<tr>inside that table” as it should.This would do what you want it to do:
jsFiddle demo