Tuesday, 15 January 2013

javascript - replace n with the variable while finding the nth child jquery -



javascript - replace n with the variable while finding the nth child jquery -

i have jquery expression

var splitindex = 9; var melems = $('#columns div:nth-child(n+9)');

here '9' hardcoded, how replace 9 splitindex. wanted dynamic values of n;

try this

$("#columns div:nth-child(n+"+splitindex+")");

javascript jquery

No comments:

Post a Comment