How to get a DOM Element from a JQuery Selector

前端 未结 4 929
不思量自难忘°
不思量自难忘° 2020-11-22 13:26

I\'m having an impossibly hard time finding out to get the actual DOMElement from a jquery selector. Sample Code:



        
4条回答
  •  不知归路
    2020-11-22 13:40

    Edit: seems I was wrong in assuming you could not get the element. As others have posted here, you can get it with:

    $('#element').get(0);
    

    I have verified this actually returns the DOM element that was matched.

提交回复
热议问题