Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
renny

horizontal - scroll trigger with touch

Recommended Posts

hello guys

im new into scrolltrigger and i have done some horizontal scroll, but i need to enable with touch scroll 

See the Pen GRvqawW by gohilinfotech (@gohilinfotech) on CodePen

Link to comment
Share on other sites

Hey there Renny,

 

Maybe this demo will set you off in the right direction?

See the Pen YRzRyM by PointC (@PointC) on CodePen

Link to comment
Share on other sites

no, because this is slider base and my demo is  scollbase with multi images,
by the way i found one example here, but im not understanding that code.
so can you help me set that code into my demo code

See the Pen YzqjGQW by GreenSock (@GreenSock) on CodePen


 

Link to comment
Share on other sites

Hi renny,

That demo looks like a good start - if you have any specific questions about the GSAP code used in it we're happy to help - but we can't help provide custom solutions for you in these forums.

Link to comment
Share on other sites

We also have a freelance forum if you need assistance with implementation!

 

Good luck with your project.

Link to comment
Share on other sites

question is how can i use that solution into my code 

 

Link to comment
Share on other sites

I'm not sure how else we can help. The demo you posted is already functional and doing what you'd like it to.

All that's left is to style it.

I'm afraid we can't help you there but if you need assistance maybe someone in the freelance forum can help you.

Link to comment
Share on other sites

Just a note that the demo you provided is using some membership Plugins, you can use them on codepen for free but should you need to use them in production you'll need to sign up to club GreenSock for access.

  • Like 1
Link to comment
Share on other sites

i just update my demo, for now i need to speed up bedraggle 

Link to comment
Share on other sites

Hi @renny. Please read the forum guidelines - we're happy to help with any GSAP-specific questions like "how do a set the duration of a tween" or "how do I reverse a timeline", but we don't have the resources to provide free build-to-order solutions where you provide a list of requirements and we tell you how to build it. That would take a lot of time. The best place for that kind of thing would be the freelance forums where you can hire someone. 

 

Good luck with your project.

Link to comment
Share on other sites

By the way, I glanced at the CodePen and I think you're just doing your dragRatio calculation incorrectly - that's based on the assumption that each "section" is taking up the entire width of the screen AND the tween is animating by 100vw but your sections are smaller than the screen and you're only animating 75vw. I assume this would be more accurate: 

var dragRatio = scrollContainer.offsetWidth / (sections[0].offsetWidth * 0.75 * (sections.length - 1));

But that assumes that the first section element's width is the same as all the others. If you need variable widths, you'd need to adjust the formula accordingly. 

Link to comment
Share on other sites

thank you for your help 

now i sorted with another code you can check it 

 

thank you so much, i will let you know if something else

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