Just wondering when do you actually use $.get(index); I am a bit confused on when and where to use $.get(index), when u can straight get any element by getting the id or class name?
(note i am not talking about the $.get() ajax call) sorry i confused some of your guys
As the docs state, .get() retrieves the DOM object, not the jQuery object. So if you need the native DOM object, you’d use .get().
Why would you need the native DOM element? For example, you might want to access methods like .play() on an HTML5 video.
$('#myvideo').play()wouldn’t work.$('#myvideo').get(0).play()would.