How do we use jQuery selector eq:()?

jQueryWeb DevelopmentFront End Technology

If you want to select an element with a specific index, then use the jQuery selector eq(). Here, set the index number to select the element.


You can try to run the following code to learn how to use jQuery selector eq():

Live Demo

<!DOCTYPE html>
<script src=""></script>

<h1>Heading 1</h1>
<p class="myclass">This is demo text.</p>
<p>This is another text.</p>
<p>This is demo content</p>

Updated on 18-Dec-2019 07:38:02