Jquery get seventh element in dom -


i trying 7th element in dom:

$('.liabilityblock'+[7]+' .large-3:last').append(createbuttons()); 

but doesn't work. can do? thanks!

try :eq() selector select nth element

$('.liabilityblock:eq('+ 6 +') .large-3:last').append(createbuttons()); 

as @j08691 pointed out correctly, can use

$('.liabilityblock:eq(6) .large-3:last').append(createbuttons()); 

if want select 7th element.


Comments

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -