Make GSAP Slider Responsive in GSAP Posted March 26, 2019 Im quite new to GSAP and currently working on a project. I found this slider here online: See the Pen qjbpaa by gvrban (@gvrban) on CodePen and modifyed it to fit my needs. You can find a it on codepen: (its ripped out of my project and anonymized so don't wonder for the look) Only problem is, if I resize the page, the slider is of and I have to do a reload of the page to get it fitting again. I understand that it is cause of the calculated variables (which are off after a resize). Is there an easy way to make it responsive or do I have to recalculate it with a window.resize? Thanks in advance. See the Pen KEYRBY by anon (@anon) on CodePen
Make GSAP Slider Responsive
in GSAP
Posted
Im quite new to GSAP and currently working on a project.
I found this slider here online:
See the Pen qjbpaa by gvrban (@gvrban) on CodePen
and modifyed it to fit my needs.You can find a it on codepen: (its ripped out of my project and anonymized so don't wonder for the look)
Only problem is, if I resize the page, the slider is of and I have to do a reload of the page to get it fitting again.
I understand that it is cause of the calculated variables (which are off after a resize).
Is there an easy way to make it responsive or do I have to recalculate it with a window.resize?
Thanks in advance.
See the Pen KEYRBY by anon (@anon) on CodePen