.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> JQuery >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Find Nth Element on a Page using jquery

Posted By:Rajshree       Posted Date: October 28, 2010    Points: 15    Category: JQuery    URL: http://www.dotnetspark.com  

eg() method is used for finding any Nth element.
 

If you want to check if the 3rd Textbox on the PAgewas Clicked:

$('input:text:eq(2)').click(function () {
    alert('You clicked inside the 3rdTextBox');
});


Check if the 3rd Link on the Page was clicked

$('a:eq(2)').click(function () {
    alert('3rd Link was clicked');
});


     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend