I am trying to understand why you would use jQuery.get()
and jQuery.get(index)
. The docs say it is to convert the jQuery selection to the raw DOM object instead of working with the selection as a jQuery object and the methods available to it.
So a quick example:
$("div").get(0).innerHTML;
is the same as:
$("div").html();
Obviously this is a bad example but I am struggling to figure when you would use .get()
. Can you help me understand when I would use this method in my code?