Alex Rivera | Logout

How to get real object from Jquery?

Asked 2010-12-05T09:34:03.230
19

How to get real object from Jquery selector result? Example:

 $("form").first().id != $("form").first().attr("id")

so this mean result somehow wrapped/delegated with jquery how to unwrap it?

Edit
Report

1 Answer

27

$("div")[0] or $("div").get(0), substituting 0 for the index of the element you want.

If you have multiple DOM elements that you want out, you can use .toArray().

answered 2010-12-05T09:36:23.557

Your Answer