Jump to content

efeito com o rato jquery


emanuelx
 Share

Recommended Posts

boas eu estou a tentar fazer um menu com efeito usando jquery, mas o problema é que ele está sempre a fazer o efeito, há alguma forma de parar?

<nav id="menu" class="navbar navbar-fixed-top" style="max-width:150px;">
<ul class="nav-stacked nav-pills nav" style="max-width: 150px; margin-left:-110px;">
<li class="active"><a style="-webkit-border-radius: 0px;-moz-border-radius: 0px; border-radius: 0px;" href="index.php">Home<span class="glyphicon glyphicon-align-justify" style="float:right "></span></a></li>
<li><a href="proj.php">projectos</a></li>
<li><a href="blog/index.php">Blog</a></li>
</ul>
</nav>
<script>
$("#menu").mouseover(function(){ $(this).animate({
opacity:'1',
left:'110px'});
});
$("#menu").mouseout(function(){ $(this).animate({
opacity:'0',
left:'0px'});
});
</script>

esqueçam já consegui

com calma e sem stresses

Link to comment
Share on other sites

esqueçam já consegui

Põe aí a tua solução.

Acho que assim também teria ficado resolvido ( { queue: false }) antes de fechares o animate()

<nav id="menu" class="navbar navbar-fixed-top" style="max-width:150px;">
<ul class="nav-stacked nav-pills nav" style="max-width: 150px; margin-left:-110px;">
<li class="active"><a style="-webkit-border-radius: 0px;-moz-border-radius: 0px; border-radius: 0px;" href="index.php">Home<span class="glyphicon glyphicon-align-justify" style="float:right "></span></a></li>
<li><a href="proj.php">projectos</a></li>
<li><a href="blog/index.php">Blog</a></li>
</ul>
</nav>

<script>
$("#menu").mouseover(function(){ $(this).animate({
opacity:'1',
left:'110px'}, { queue: false });
});
$("#menu").mouseout(function(){ $(this).animate({
opacity:'0',
left:'0px'}, { queue: false });
});
</script>

"Que inquieto desejo vos tortura, Seres elementares, força obscura? Em volta de que ideia gravitais?" >> Anthero de Quental

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Linuxando.com | ...

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.