Prev Demo
jQuery
>
.Eq() - Get Specific Element Form Group
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> <style> p{ color:green; height:20px; float:down; border:1px brown; } </style> </head> <body> <p>1</p> <p>2</p> <p>3</p> <p>4</p> <p>5</p> <script> $('p').eq(2).css('color', 'red'); </script> </body> </html>
Note: We DO NOT save your trial code in our database.
Output