Jump to content
Fórum Script Brasil
  • 0

Função onmouseover. Como adiciona-la no script?


Led Lemos
 Share

Question

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>

&lt;script type="text/javascript" src="scripts/jquery.js" /></script>
&lt;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>

&lt;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 by Led Lemos
Link 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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      150.9k
    • Total Posts
      648.7k
×
×
  • Create New...