SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  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

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    5,938
    Mentioned
    214 Post(s)
    Tagged
    12 Thread(s)
    Hi adivenu123,

    I'm afraid I missed your question the first time round and only saw it just now thanks to a spammy reply you received (which I removed).

    Anyway, did you work this out in the meantime or are you still looking for an explanation?
    If so, just let us know.


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
  •