Jump to content
Search Community

Scrolling Page using Transform matrix instead of href property

soheil22 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello guys.

 

I'm back with another question :D

well,

 

I want to know is there any other way that I could trigger the ending point instead of using href tag?

The only way that I've found to do this, is using transform matrix property of css.

I wanted to use greensock ScrollTo property in order to animate the scrolling process,but as it seems 

Gsap uses href property in order to find the destination.

Is there anyother way so that I could do this without referring the href ?

I have an example website but I don't know what he's been using for doing this,

and I can mention it here if it might help.

 

Thank you very much.

S.rb

Link to comment
Share on other sites

When I look at the scrollToPlugin docs

 

http://greensock.com/docs/#/HTML5/GSAP/Plugins/ScrollToPlugin/

 

I see that you can also pass x and y to your scrollTo property of your tween

 

scrollTo: {x: someNumber, y: someNumber}

 

So the scrollToPlugin can use transforms for the scrollTo property inside your tween, or using a selector like Carl posted above ;)

 

:)

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...