TMota Posted July 26, 2012 at 12:00 PM Report Share #470432 Posted July 26, 2012 at 12:00 PM Boas Gente Preciso da vossa ajuda, como já devem adivinhar! A ideia é a seguinte: Quando houver um mouseover na imagem preciso que altere a propriedade da div (que troque o estado de invisivel para visivel), e depois que faça o contrario, onmouseout volte a ocultar a div! Eu exprimentei o seguinte código mas não está a funcionar. Como é que posso solucionar, sem ter que recorrer a jquery ou a outro tipo de linguagem? Imagem: <img src="images/gallery_decor_normal.png" width="150" onmouseover="this.src='images/gallery_decor_hover.png', this.width='200', document.documentElement.client.style='display:show'" onmouseout="this.src='images/gallery_decor_normal.png', this.width='150'"> Div: <div id="client" style="display:none">XPTO 1</div> Tiago Mota - www.tiagomota.pt Link to comment Share on other sites More sharing options...
HappyHippyHippo Posted July 26, 2012 at 12:26 PM Report Share #470439 Posted July 26, 2012 at 12:26 PM <img src="myimage.png" onmouseover="document.getElementById('client').style.display = 'block'" onmouseout="document.getElementById('client').style.display = 'none'" /> <div id="client" style="display:none">XPTO</div> IRC : sim, é algo que ainda existe >> #p@p Portugol Plus Link to comment Share on other sites More sharing options...
TMota Posted July 26, 2012 at 01:17 PM Author Report Share #470444 Posted July 26, 2012 at 01:17 PM Funcionou! Obrigadão Mano..... Tiago Mota - www.tiagomota.pt Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now