[英]jQuery counting highest number of children in parents
I'd appreciate help on the following problem: Let's say I have a number of ul
elements on a page, each with a number of li
children, eg 感谢您解决以下问题:假设我在页面上有多个
ul
元素,每个元素都有许多li
子元素,例如
<ul>
<li></li>
<li></li>
</ul>
<ul>
<li></li>
<li></li>
<li></li>
</ul>
What would be the best way to find the highest number of children across all ul parents (In the example above, it should return 3 )? 在所有ul父母中找到最多子女数量的最佳方法是什么(在上面的示例中,它应该返回3 )?
Many thanks, Ch 非常感谢,Ch
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.