Skip to content Skip to sidebar Skip to footer

Increment Nth-child Selector Of Jquery

With refernece to That I need to iterate through nth-child selector, That is var i =1; var tmp = $(this).find('td:nth-child(i+1)'); // Wondering How this behavior can be achie

Solution 1:

You cannot access a variable like 'td:nth-child(i+1)'.

Change it to:

var tmp = $(this).find('td:nth-child('+(i+1)+')');

Post a Comment for "Increment Nth-child Selector Of Jquery"