Jump to content
Search Community

Peleg S last won the day on January 27 2014

Peleg S had the most liked content!

Peleg S

Premium
  • Posts

    8
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Peleg S

  1. Yeah its possible. 
    The best thing is if the children div's will have a unique class name. In your case each div has a diffrent class name (message1,message2..), best thing is to give them a common class name, and then staggering them.
    But if you know that all of the child elements are messages you can easily do something like this:

    TweenMax.staggerFromTo($('#message-container').children(),0.4,{alpha:0},{alpha:1},0.2)
    

    here's a codepen:

    See the Pen avits by bazooki (@bazooki) on CodePen

     

    Hope this helps =)

    • Like 1
    • Thanks 1
  2. The reason is because you're runing the animation each time the mouse is entering\leaving. In your case you might want to prevent the user from triggering the animation if it's already animated.
     
    Im not sure what im suggesting is the best approach, but this is what i would do:
    adding this condition to mousehover function.
     

    if(TweenLite.getTweensOf($(this)).length !=0 )
    return;
    

    See the Pen iFwqk by bazooki (@bazooki) on CodePen

    • Like 2
×
×
  • Create New...