Suppose there are several lists, within which there is a different number of elements. We need to know how many lists, and how many items in each of them. And also to limit the output of elements in lists of three, that is, when you click on a specially trained button, three more elements are displayed, if any. Tell me, please, how to implement this with jQuery?
<ul class="list"> <li class="item-1"></li> <li class="item-2"></li> <li class="item-3"></li> <li class="item-4"></li> <li class="item-5"></li> <li class="item-6"></li> <li class="item-7"></li> <li class="item-8"></li> </ul> <ul class="list"> <li class="item-1"></li> <li class="item-2"></li> <li class="item-3"></li> <li class="item-4"></li> <li class="item-5"></li> <li class="item-6"></li> </ul> <ul class="list"> <li class="item-1"></li> <li class="item-2"></li> <li class="item-3"></li> </ul>
правку поста
- Vasily Barbashev