jquery : find the element below one element

后端 未结 1 801
傲寒
傲寒 2021-01-23 01:40

I am creating a simple application using jquery, in this application I can drag an element(DIV) along the document. I can place the DIV at any position in the document, If I pla

1条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-23 02:20

    If you DIV has a specific ID or class you can use the next() function (documented here).

     $('#dragdiv').next()
    

    Then you can directly work with that jquery element or use attr() to obtain it's attributes (ID, etc)

    0 讨论(0)
提交回复
热议问题