Hide Div from another

2

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> 
</div>

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').contents().find('#div_Date').hide()

container is the main div of my html homepage

    
asked by PolloKulos 27.09.2018 в 18:43
source

1 answer

0

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");

Source

    
answered by 27.09.2018 в 18:50