Results 1 to 2 of 2

Thread: jQuery Effects Bounce Issue. - Wont Stop Bouncing!

  1. #1
    Join Date
    Aug 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile jQuery Effects Bounce Issue. - Wont Stop Bouncing!

    Hi all.
    I am trying to stop this script from continually running whilst to mouse is over the link.
    I have tried using '.stop()', but to no avail. Perhaps i'm putting in the wrong place?

    I would like the script to run just the once whilst the mouse is over the link.
    Also, is their a way to stop the script 'cuing', if the mouse were to pass over the link a few times?

    Can anyone offer advice on this?

    All input will be greatly received.

    Many thanks,
    Bil

    Code:
    <script src="http://jqueryui.com/latest/ui/effects.core.js"></script>
    <script src="http://jqueryui.com/latest/ui/effects.bounce.js"></script>
    
    <script type="text/javascript">
      $(document).ready(function(){
       
    $('li').hover(function() {
            $(this).effect("bounce", { times:0 }, 100);
            }, function () {
    });
    
      });
      </script>

  2. #2
    Join Date
    Jun 2009
    Location
    Hampshire, UK
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi there,

    I ws trying to do something like this too, but I couldn't get the bounce to behave in a consistent manner. I ended up doing an animate, it's not really a bounce, but the effect looks good enough for my application:

    Code:
    <script type="text/javascript"> 
            $(document).ready(function() {
                $('.bounceLink').hover(
                    function() {
                        $(this).animate({ bottom: '10px', height: '65px' }, 'fast');
                    },
                    function() {
                        $(this).animate({ bottom: '0', height: '65px' }, 'fast');
                    });
            });
        
    	</script>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •