Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
10
rated 0 times [  12] [ 2]  / answers: 1 / hits: 17799  / 13 Years ago, tue, march 22, 2011, 12:00:00

I'm a beginner in JQuery,



How can I get the control as a javascript object from a JQuery object



var _object = $(this). ??

More From » jquery

 Answers
31

Most common
var _object = $(this)[0];



If you have more than 1 elements matched: $(this)[0], $(this)[1], $(this)[2] and so on.



$(this).get() is also possible. It's only advantage over the array model is that it allows selection of the kind $(this).get(-1) where it gets you the last matched object


[#93145] Sunday, March 20, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
susanajamiep

Total Points: 466
Total Questions: 113
Total Answers: 108

Location: Liberia
Member since Fri, Oct 22, 2021
3 Years ago
susanajamiep questions
Sun, Jun 12, 22, 00:00, 2 Years ago
Mon, Mar 7, 22, 00:00, 2 Years ago
Wed, Jun 10, 20, 00:00, 4 Years ago
Fri, Jan 24, 20, 00:00, 4 Years ago
;