Jump to content
Search Community

FearMe4va

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by FearMe4va

  1. once the image change it should image should fade 

    $('.list li a').hover(function() {
      var value= $(this).attr('data-src');
      var val = $(".image-holder img");
      TweenMax.to(value, 1, {
       attr:{
        src:val
       },
       ease: Power1.easeInOut,
       yoyo:true
      })
    });

    i tried this but didn't work for me 

  2. 7 minutes ago, GreenSock said:

    I'm not quite sure what you mean. Are  you trying to fade a new image on top of the old one? Or slide another one in? Please be more specific about what your goal is and we'd be glad to help as long as it's a GSAP-specific question. If you want to transition a new image in, you'll need to actually create another element because during the transition obviously both would be visible. See what I mean? So for example, you could have an <img> element that sits above the others, and you swap in the new source to that one, have its opacity 0 and animate that up. Then recycle the old one by hiding it (after the animation), and then for the next transition, put that one on top and repeat the process. Just one idea - there are many ways you could do this. 

    i am trying to replace the image with this data-attr like in this example

     

    See the Pen MWYQNdL by Fearless4va (@Fearless4va) on CodePen

     

    like this which i have done in jquery but i am looking some transition in tweenMax

×
×
  • Create New...