Led Lemos Posted June 14, 2012 Report Share Posted June 14, 2012 (edited) Galera, tenho esse script abaixo e é a forma bem simples de um box de notícias.Sei quase nada de javascript, e quero adicionar o onmouseover, para que quando deixar o mouse sobre a noticia/imagem, ele pare o efeito.E quando tirar o mouse, volte ao normal.Podem me ajudar:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Teste</title> <script type="text/javascript" src="scripts/jquery.js" /></script> <script type="text/javascript" src="scripts/cycle.js" /></script> <style type="text/css"> #destaques { width: 500px; height: 300px; overflow: hidden; } #destaques ul { list-style: none; } #titulonoticia { margin: -120px 0 0 50px; font: 20pt bold Arial, Helvetica, sans-serif; color: #fff; } #noticia { margin: 0px 20px 0 20px; font: 12pt Arial, Helvetica, sans-serif; color: #fff } a{ color: #fff; } </style> <script type="text/javascript"> $(function(){ $('#destaques ul').cycle({ fx: 'fade', speed: 1000, timeout: 3000, }) }) </script> </head> <body> <div id="destaques"> <ul> <li> <img src="images/8678155.salta_turismo_300_500.jpg" alt="" /> <p id="titulonoticia"><a href="#">Notícas do Texto</a></p> <p id="noticia"><a href="#">oaisbndoia oais daoidbgoi dboi dbiodgdfbdofi bfug bdi bdh bdhif bdfh bdfig bdig udbf bdbg dfgbdgba weiugbei tt8 3bt p948 tw4tb</a></p> </li> <li><img src="images/g_paisagem_rural06.jpg" alt="" /></li> <li><img src="images/g_paisagem_rural08.jpg" alt="" /></li> <li><img src="images/maui-paisagem.jpg" alt="" /></li> </ul> </div> </body> </html> Edited June 14, 2012 by Led Lemos Quote Link to comment Share on other sites More sharing options...
0 fiote Posted June 14, 2012 Report Share Posted June 14, 2012 document.getElementById('id do elemento').onmouseover = function() { fazAlgumaCoisa(); } Quote Link to comment Share on other sites More sharing options...
0 Led Lemos Posted June 15, 2012 Author Report Share Posted June 15, 2012 não teria como montar o codigo? rs :D ABraços Quote Link to comment Share on other sites More sharing options...
Question
Led Lemos
Galera, tenho esse script abaixo e é a forma bem simples de um box de notícias.
Sei quase nada de javascript, e quero adicionar o onmouseover, para que quando deixar o mouse sobre a noticia/imagem, ele pare o efeito.
E quando tirar o mouse, volte ao normal.
Podem me ajudar:
Edited by Led LemosLink to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.