jQuery find an element by its index

后端 未结 7 1809
灰色年华
灰色年华 2020-12-21 16:18

If I have a selection

item 1
item 2
item 3
相关标签:
7条回答
  • 2020-12-21 16:53

    Good morning you could use the nth-child selector:

     var item = $('#container div:nth-child(2)');
    
    0 讨论(0)
提交回复
热议问题