Hi All, As the title goes I am trying something like
$("ul li:nth-child(' + xx + ') a").text() //this is coming as blank.
what is the correct format?
Hi All, As the title goes I am trying something like
$("ul li:nth-child(' + xx + ') a").text() //this is coming as blank.
what is the correct format?
You need this format:
var xx = 4;
$("ul li:nth-child(" + xx + ") a").text()
You want to actually append to the string here to get what you want so it results in this:
$("ul li:nth-child(4) a").text()