Skip to content
Advertisement

Count the number of

Is it possible using jQuery to count the number of div elements?

I have this code:

JavaScript

And get number: 3

Advertisement

Answer

$("#center div").length will give you the count.

Advertisement