9
I have the following structure in my header:
<header>
...
<div id="header-reserva" class="cf">
<a href="#header-reserva-iframe" class="scroll">Reserve aqui!</a>
</div>
...
<iframe id="header-reserva-iframe" src="http://www.meuiframe.com"></iframe>
</header>
The iframe is with display None, because I just want it to appear when the link is clicked. For this I made a code in Jquery:
$("#header-reserva a").click(function()
{
$("#header-reserva-iframe").css('display', 'inherit');
});
The iframe is shown when the link is clicked, but the link is not directed to the iframe in the first click, and a second click is required for this, that is, I need the link in the first click to show the iframe and navigate to the top of it. How can I do that?
It worked perfectly! Thank you!
– João Paulo Saragossa