title: How to remove all li elements inside an ul except the first and the last elements using jQuery?
body: <p>I have a <code>&lt;ul&gt;</code> element. How can remove all the <code>&lt;li&gt;</code> elements inside it, except for the first and the last, using jQuery?</p>