Is there a general way to index in jQuery? I know there's .first() but how about .second() or .third() -


this question has answer here:

this seems pretty simple question couldn't find answer. have 3 forms on side open when button pressed , want autofocus cursor on whichever 1 of forms opens up. because forms identical, i'm having trouble referencing individual one, , it's on squarespace can't add id. grateful on this. thanks!

you use .eq() method. supply index (they 0 based).

given jquery object represents set of dom elements, .eq() method constructs new jquery object 1 element within set. supplied index identifies position of element in set.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -