© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
Nikhil Dange
Software Engineer
How to hide 1st five <li> tag and display next 5 <li> tag using css or JQuery
Purvi Barot
Try this following script :
<script> $(document).ready(function (){ $("ul").click(function (){ $("li:lt(5)").hide(); }); }); </script>
patel shraddha
Software Developer @iFour Technolab Pvt Ltd
li:nth-of-type(-n+5) {display: none;}
Purvi Barot
Software Engineer
Try this following script :
<script> $(document).ready(function (){ $("ul").click(function (){ $("li:lt(5)").hide(); }); }); </script>