Dom
Dom

Reputation: 3126

how to select all td apart of last child using jQuery

Im trying to figure out code that will allow me wrap content inside td apart from last child

What I have here does not work.

$('.ResultsRow2 td:not(last-child)').wrapInner('<div style="padding-top:4px"></div>')

Could you please advice me how to select all columns apart of the last one?

Thank you in advance!

Upvotes: 0

Views: 235

Answers (1)

tvanfosson
tvanfosson

Reputation: 532765

Your last-child selector needs a colon in front of it.

$('.ResultsRow2 td:not(:last-child)')...

Upvotes: 4

Related Questions