Say I have an unordered list, like so:
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li>Four</li>
<li>Five</li>
</ul>
How would I, using JQuery, hide the last 2 list items and have a 'show more' link there, so when clicked upon, the last 2 list items would appear?
<ul>
<li>One</li>
<li>Two</li>
<li>Three</li>
<li style="display:none;">Four</li>
<li style="display:none;">Five</li>
<li>Show More</li>
</ul>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…