SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Threaded View

  1. #1
    SitePoint Member
    Join Date
    Sep 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Animation related doubt from the book Jquery Novice to Ninja

    Hi Guys,

    I have a doubt regarding chapter 3,pg 66 in this book Jquery Novice to Ninja. The example code given here for the navigation animations differ slighlty from the code archive. I don't clearly understand the mouseout function below:-
    Code JavaScript:
    // Mouse out function
    $('#navigation_blob')
    .stop(true)
    .animate(
    {width: 'hide'},
    {duration: 'slow', easing: 'easeOutCirc', queue: false}
    )
    .animate(
    {left: $('#navigation li:first a').position().left;},
    'fast'
    );
    }

    The code archive doesn't use the stop function. Adding it also doesn't make any difference. If i change the second animation part:-
    Code JavaScript:
    .animate(
    {left: $('#navigation li:first a').position().left;},
    'fast'
    );
    from 'fast' to 'slow', i noticed that the blob doesn't whisk back to the menu item i just hovered. It goes to the first menu item and stays there.Why is it so?
    Can anyone provide proper explanation as to what exactly is going on in this mouseout event animation?
    Last edited by Mittineague; Sep 22, 2013 at 00:43. Reason: reformatting bbcode tags


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
  •