Add something after the “n” element using jQuery

后端 未结 6 1670
忘了有多久
忘了有多久 2020-12-13 08:49

For a markup like

div 1
div 2
div 3
6条回答
  •  暖寄归人
    2020-12-13 09:30

    $("#holder div:eq(1)") will select the second child div of the #holder div. (:eq() selector info). Then use the .after() function to append content.

提交回复
热议问题