0

Below code gives me JQuery object, which includes JQuery functions associated with.

var element = $("#element");

But how can I get the HTML DOM element from the above JQuery object ?

2 Answers 2

3

Fetch first item from jQuery object

var element = $("#element")[0];
Sign up to request clarification or add additional context in comments.

Comments

2

You can use get (link to API).

 element.get()

It will return an array.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.