Jump to content
Search Community

david

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by david

  1. Hi, 

     

    I try to scroll from an anchor to a div, it's work to go to the top of window but from top of window to a bottom section it doesn't work.

    See the Pen dtJog by dhenriet (@dhenriet) on CodePen

    function TweenScroll(anchor) {
    
    	$(anchor).click(function(e) {
    		e.preventDefault();
    
    		var domId = $(anchor).attr('href');
    		//.attr('href').slice(1);
    		var domScroll = $(domId).offset().top;
    		
    		console.log(domScroll);
    
    		TweenMax.to(window, 1.5, {
    			scrollTo: {
    				y: domScroll
    			},
    			ease: Back.easeInOut
    		});
            });
    	
    }
    
    TweenScroll('#top');
    TweenScroll('#start');
    
  2. Hi Rodrigo, thanks for your answer. There wasn't tween on background position (set in pixel instead of percent), I updated the jsFiddle link in case of someone has a few time to look it. http://jsfiddle.net/gamedware/wdn8q6oh/

    I already create an issue on ScrollMagic Github because I don't know if the problem comes from ScrollMagic or GSAP I am very worried because I have to make a parallax animation (so I choose ScrollMagic + Tween Js) and if I can't tween more than one <div> it's problematic.

    I understand you don't support third party plugins but I create a CodePen with only GSAP and I have the same problem, only once has a tween

    See the Pen qtsgi by dhenriet (@dhenriet) on CodePen

×
×
  • Create New...