
To find a specific element from the group of similar kind of element, eq()
method can be used.
<script>
$('p').eq(2).css('color', 'red');
</script>
Above code snippet shall find the 2nd paragraph (“p”) from the page and apply foreground color as red.
Views: 6122 | Post Order: 42