.get() and .eq() both return a single "element" from a jQuery object array, but they return the single element in different forms.
.eq() returns it as a jQuery object, meaning the DOM element is wrapped in the jQuery wrapper, which means that it accepts jQuery functions.
.get() returns an array of raw DOM elements. You may manipulate each of them by accessing its attributes and invoking its functions as you would on a raw DOM element. But it loses its identity as a jQuery-wrapped object, so a jQuery function like .fadeIn won't work.
I am giving an example that explains the points given by others here.
consider the following code
<div id="example">
Some text
<div>Another div</div>
<!--A comment-->
</div>
and the corresponding js code,
$(document).ready(function() {
var div = $("#example").get(0);
console.log(typeof(div));
console.log(div);
console.log("XXXXXXXXX");
var div_eq=$('#example').eq(0);
console.log(typeof(div_eq));
console.log(div_eq);
});
jQuery eq() method selects a HTML element with a specific index number.
Here is an example of that
<body>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
$( "body" ).find( "div" ).eq( 2 ).addClass( "red" );
// it finds the second div in the html body and change it to red color.