Jump to content

.hover going mad! Any idea why?


unplugged_web

Recommended Posts

I've added a 'hide/show' to some buttons and they work great until I roll over them then they go mad. I've set it so that when you roll over the 'tab' div the buttons show but as soon as you roll over either the 'right_arrow' or 'left_arrow' they start to repeat the function over about 10 times before they stop - how do I stop that?

<script type="text/javascript">$(function(){//ARROWS  $('#tabb').hover( function(){ automode=0;$("#left_arrow").animate({left: 0},'swing').show(); },function(){ automode=1;$("#left_arrow").animate({left: -100},'swing').hide(200); } );  $('#tabb').hover( function(){ automode=0;$("#right_arrow").animate({right: 0},'swing').show(); },function(){ automode=1;$("#right_arrow").animate({right: -100},'swing').hide(200); } );  });</script> <div id="tabb" style="position: relative; visibility: visible; overflow: hidden; width: 994px; height: 275px;"><div class="slide" style="position: absolute; left: -994px; width: 994px; height: 275px; text-align: center; visibility: hidden; z-index: 49;"><div style="width:994px;height:275px;display:table-cell;vertical-align:middle;"><a href="/products/bundles.php" target="undefined"><img src="/images/dynamic/new_product_bundles_carouselv2.jpg" style="border-width:0;"></a></div></div><div class="slide" style="position: absolute; left: -994px; width: 994px; height: 275px; text-align: center; z-index: 50; visibility: hidden;"><div style="width:994px;height:275px;display:table-cell;vertical-align:middle;"><a href="/products/lawhey2kg" target="undefined"><img src="/images/dynamic/lawhey-protein-best-shake.jpg" style="border-width:0;"></a></div></div><div class="slide" style="position: absolute; left: -994px; width: 994px; height: 275px; text-align: center; z-index: 51; visibility: hidden;"><div style="width:994px;height:275px;display:table-cell;vertical-align:middle;"><a href="/products/aj" target="undefined"><img src="/images/dynamic/aj-boxer.jpg" style="border-width:0;"></a></div></div><div class="slide" style="position: absolute; left: 0px; width: 994px; height: 275px; text-align: center; z-index: 52; visibility: visible;"><div style="width:994px;height:275px;display:table-cell;vertical-align:middle;"><a href="/about/shipping.php" target="undefined"><img src="/images/dynamic/uk_delivery_carousel_banner2.jpg" style="border-width:0;"></a></div></div></div> <div class="paginate" style="position: absolute; top: 25%; z-index: 1000; width: 994px;"><div id="left_arrow" style="position: absolute; left: -100px; display: none;"><a href="javascript:firstreel.navigate('back')" style="float:left;"><img src="/images/dynamic/arrow_left.png" /></a></div>  <div id="right_arrow" style="position: absolute; right:  -100px; display: none;><a href="javascript:firstreel.navigate('forth')" style="float: right;"><img src="/images/dynamic/arrow_right.png" /></a></div></div>
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
×
×
  • Create New...