Hide Div from another


I have on my html page, a div called div_Date, inside it I have an iframe (here I have a page  "Demo"), what I want and if you can, is within the "Demo" page, can I hide the div_Date, any suggestions? with jquery

<div id='div_Date'> 
    <iframe src="url">paginaDemo </iframe> 

What I want is from the paginaDemo when executing a certain instruction to hide the div_Date that in this case is my container, I have tried it with jquery in the following way:


container is the main div of my html homepage

asked by PolloKulos 27.09.2018 в 18:43

1 answer


The correct way to do it is to use show and hide:

$('#id').hide();//Oculatar Elementos
$('#id').show();//Mostrar Elementos

An alternative way is to use the jQuery css method:

$("#id").css("display", "none");
$("#id").css("display", "block");


answered by 27.09.2018 в 18:50