let's say there is a parent id that contains a lot of elements, and I want to delete all the elements except one.
ex .:
<div id = "parent_id"> <div id = "id_1"> <div id = "id_11"> </div> <div id = "id_11"> </div> </div> <div id = "id_2"> </div> <div id = "id_n"> </div> // No need to remove this id_n only </div>
How can I remove innerHTML like this document.getElementId('parent_id').innerHTML = ''; but I do not need to remove id_n . is there any way to do this using javascript or jQuery.
user744587
source share