Remove all li from ul in jquery

By 1st August 2019JQuery

If you have a <ul> and <li> in <ul>, and if you want to clear or remove all li from <ul>, here jquery code to empty this <ul>

HTML Code :

<ul class=”attachmentList”>

<li>First</li>

<li>Second</li>

<li>Third</li>

</ul>

 

$('.attachmentList').empty();