Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery apply css to all elements except second row

Tags:

jquery

css

I am trying to move all rows data except second row using jquery. How do I achieve that?

My Fiddle

$(document).ready(function() {
    $("#tblTest tr:nth-child(2) td").css("padding-left", "30px");  
    //$("#tblTest tr:not(nth-child(2)) td").css("padding-left", "30px");  

});
like image 768
Kurkula Avatar asked Apr 07 '14 10:04

Kurkula


1 Answers

Your attempt was close, you just missed the colon before nth-child:

$("#tblTest tr:not(:nth-child(2)) td").css("padding-left", "30px");
//-----------------^--This One

JSFiddle

like image 102
George Avatar answered Oct 04 '22 23:10

George