OiO.lk Blog jQuery Remove div inside parent div in jquery object only
jQuery

Remove div inside parent div in jquery object only


I have a divs inside parent div:

<div id="parent">
  <div id="child">some content1</div>
  <div id="child">some content1</div>
</div> 

I get the parent div using jQuery:

var allDivs= $("#parent").html();

I want to remove child divs from this parent, how I can do this? Child divs should be deleted from jQuery object but not from DOM, is it possible?



You need to sign in to view this answers

Exit mobile version