Hide parent div but show child div within it.

How to show the child div but kipping it's parent div hide.

Technically it's impossible, but by using Jquery we can make child div's or  element's clone and then  can put it outer from that parent div.

'Look how we done it by the Jquery clone method.'

HTML==>
 <div class="Div1"> </div>
 <div class="container" style="display:none;">
      <div class="ApImage">
         <p>this is the test div</p>
     </div>
</div>

JQuery==>
<script> 
  $(document).ready(function(){
   var fieldShow = JQuery(".ApImage").clone();
   fieldShow.appendTo(".Div1");
});
</script>

Comments

Popular posts from this blog

datatable with both top and bottom scroll bar.

Display Loader and disable page while waiting for ajax request

Remove GIT integration from VSCode