Jump to content
Search Community

Rhaffaele

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by Rhaffaele

  1. Thanks so much now it works.
    you are right, better to group and keep the programming dry. But it's not easy and I'm a beginner. During the week I will try to fix it

  2. I replaced the dragable images now it should work.
    I did this code pen, if you drag the first image to target two go back with an animation, if you do it the second time the animation is different, but it should be the same.

    See the Pen oNNJjQy by rha-elettronica (@rha-elettronica) on CodePen

  3. I don't understand why it doesn't work for you.  It works for me. Can you see the image of the woman? I tried to upload it to codepen but I can't insert images, I should do it again with the box instead of images.

  4. On 7/21/2013 at 7:22 PM, Rodrigo said:

    Hi and welcome to the forums.

     

    Maybe you could try adding a relative rotation, for example enhance the element's rotation by 180 degrees each time, like this:

    
    TweenMax.to(element, time, {rotationY:'+=180'});

    Another possibility would be to create a timeline for each card and you can play it forward on mouse over and backwards on mouse out, like this:

    
    $("div.element").each(function(i, element)
    {
        var tl = new TimelineLite({paused:true});
        tl.to(element, 1, {rotationY:180});
        element.animation = tl;
    })
    
    $("div.element").hover(elOver, elOut);
    
    function elOver()
    {
        this.animation.play();
    }
    
    function elOut()
    {
        this.animation.reverse();
    }

    I've created a codepen so you can see it working:

     

     

     

    Also take a look at this codepen by Chris Gannon is completely awesome, maybe you can get a couple of ideas out of it:

     

     

     

    Hope this helps,

    Cheers,

    Rodrigo.

     

    On a side note great picture, I remembered the phrase:"arghh... the goggles do nothing!!"

    This is really beautiful. How can I replace the image in the back with an html div?

×
×
  • Create New...