jQuery - count elements with .length

0 votes
284 views
added Feb 13, 2020 in jQuery by lcjr Lieutenant (12,460 points)
// check how many paragraph
var count = $("#article0 .news-body p").length;
alert(count);

 

lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...