javascript - Delete only the particular Div Id -
<div id="@("bottomgrid)" class="dgd2"></div>
var element = document.getelementbyid("#bottomgrid"); element.empty(); $('.dgd2').empty()
instead of deleting bottom grid removing other div present in screen.
if have html structure this:
<div class="holder"> <div id="item1">hey</div> </div>
you can use pure javascript code remove "item1" element:
var element = document.getelementbyid("item1"); element.parentnode.removechild(element);
Comments
Post a Comment