I was wondering if its possible to make an IF statement, where if a container (parent div) contains/does not contain a certain div….
<div class="parent" id="x">need to check if div id "n" is here....</div>
So, IF the parent container (“x“) does not contain the div “n“, then insert it (which I already know how to do).
Is the above even possible to achieve?
JS and JQuery can be used by the way..
Thanks
try this one