How can I convert a jQuery object to an Element?
You can use the dereferencing operator, or the .get()
method to "Retrieve the DOM elements matched by the jQuery object."
Examples:
txtArea[0].value = "something";
or:
txtArea.get(0).value = "something";
The jQuery .get()
will do that for you
http://api.jquery.com/get/
Quoted:
Without a parameter,
.get()
returns all of the elements:alert($('li').get());
With an index specified,
.get()
will retrieve a single element:($('li').get(0));
...we can use the array dereferencing operator to get at the list item instead:
alert($('li')[0]);