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");
});
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With