With jQuery is there a way remove an LI items after position 6?
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
</ul>
A way to dynamically remove items 6+ (6 & 7 in this case) and not break if there are less than 6 items? Any ideas? Thanks
Just:
http://jsfiddle.net/zerkms/dpCsj/
PS: in your title you say “after 5” and “after 6” is in the question body. I’ve chosen the one from the title