Jump to content
Search Community

Make whole site draggable

martis 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

Hi,

 

I am trying to enable tween animation on scroll for mobile.

 

How would I go about making my whole site (#site, 9400px tall) draggable to avoid using native scroll on mobile... so that I can maybe get animations on scroll

 

I am trying this, but it keeps limiting itself to the top and bottom of the iphone's browser

Draggable.create("#site", {
				type:"scrollTop", 
				bounds:{top:-9400, left:0, width:0, height:9400}, 
				onDrag:function () { 
					console.log(this.y);
				}, 
				edgeResistance:0.5, 
				throwProps:true
			});	

Thanks!

 

 

UPDATE: I ended up wrapping my #site in a container and it is working now

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...