Jump to content
Search Community

hellol11

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by hellol11

  1. Are you using the callbacks fullpage.js supplies. If not refer to the documentation there are callbacks supplied where you place events that you want to trigger linked to scrolling through sections and slides.

     

    If you are using the callbacks make sure you are using adequate specificity in your selectors to make sure that your scripts are running on items only contained within the slide/section you are targeting. ie if you simply select items on the dom the scripts will run your animation the first time or every time you scroll and the callbacks are invoked, regardless of whether the items are in the section you are scrolled to, selectors have to target the section you are in and the dom element you want to fire the event on.

    fullpage.js only gives sections, it doesn't do anything as far as callbacks.

  2. So, here is an idea:

     

    Let's say I have an element that I want to have animated with different eases for the x and y props. Normally, to do that, I would have to do this:

    TweenMax.to("#box", 1, {
        x:200, 
        ease:Power4.easeOut
    });
    TweenMax.to("#box", 1, {
        y:200, 
        ease:Power4.easeIn
    });
    

    But, what if I could do it like this instead:

    TweenMax.to("#box", 1, {
        x:{
            value:200, 
            ease:Power4.easeOut
        }, 
        y:{
            value:200, 
            ease:Power4.easeIn
        }
    });
    

    I think that would be a pretty cool thing to have. Can you guys make this happen?

    See the Pen bpjpEv by hellol11 (@hellol11) on CodePen

  3. Hi,

     

    I believe that the issue is on your jquery code. My impression is that you're kind of over-complicating the code. Is simpler like this:

    var listItems = $("#list li");
    
    listItems.each(function(i,e){
    	
      var t = TweenLite.to(e, 0.5, {fontSize:30, paused:true});
    	
      e.fontTween = t;
    	
      $(e).hover(function(){
        e.fontTween.play();
      },function(){
        e.fontTween.reverse();
      });
    	
    });
    

    See the Pen PNaaMX by anon (@anon) on CodePen

    This is really interesting. I am new to jquery, so this is some new code to me.

×
×
  • Create New...