add variable to nth child jquery code example
Example: add variable to nth child jquery
var position = 5;
$("#daddy > div:nth-child(" + position + ")").animate({
opacity: 0.01,
}, 500);
var position = 5;
$("#daddy > div:nth-child(" + position + ")").animate({
opacity: 0.01,
}, 500);