How to Count Elements on Page using JQuery


You want to count images, links or any other type of elements on page. You can use JQuery size() method.

The following code will count total number of images on page.

alert($("img").size());

 

 

About author


User avatar

Waqas Anwar

Founder of EzzyLearning.com, Senior Consultant, Microsoft .NET and Web Technologies

Add Comment