Highlighting columns in a table with jQuery

后端 未结 6 1976
感动是毒
感动是毒 2021-01-16 02:02

I have a table and I am highlighting alternate columns in the table using jquery

$(\"table.Table22 tr td:nth-child(even)\").css(\"background\",\"blue\");
         


        
6条回答
  •  醉酒成梦
    2021-01-16 02:52

    Untested but perhaps: http://docs.jquery.com/Traversing/not#expr

    $("table.Table22 tr td:nth-child(even)").not("table.Table22 tr td table").css("background","blue");
    

提交回复
热议问题