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>
Theiframeiswithdisplaynone,becauseIonlywantittoappearwhenthelinkisclicked.ForthisImadeacodeinJQuery:
$("#header-reserva a").click(function()
{
$("#header-reserva-iframe").css('display', 'inherit');
});
The iframe is displayed when the link is clicked, but the link is not directed to the iframe on the first click, a second click is required for it, ie I need the link in the first click to both show the iframe and navigate to the top of it. How can I do this?