s

how to remove li in ul using jquery edit button Edit

author
Murugan Andezuthu Dharmaratnam | calendar 18 September 2020 | 2740

how can I remove all the li element within a ul tag using jquery?

<ul id="ultest">
  <li>Hello Hello</li>
  <li>This is</li>
  <li>A Test</li>
</ul>

you can clear all the li elements in elements tag using jquery below

$("#ultest").empty()