Hi
I want to remove the first <LI> item and last three <LI> item from <UL> list. How to write code in JQuery.
I need the below list
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
</ul>
as below result
<ul>
<li>1</li>
<li>5</li>
<li>6</li>
<li>7</li>
</ul>
I tried like
$("ul li:not(:first-child, eq(-2))").remove();
but does not give the clear result to me.