jQuery - count elements with .length

0 votes
187 views
added Feb 13, 2020 in jQuery by lcjr First Warrant Officer (11,890 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.
...