jQuery - count elements with .length

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