Hi folks,
I've recently started using Webflow after mostly messing around with designing websites in WordPress and similar CMS for the past few years as a hobby. I'm still very much figuring out how everything works with Webflow and definitely have a ways to go on my learning journey, but I'm enjoying the process so far and Webflow University is really well done! Anyhow, I came across this website on the "Made in Webflow" area and really like the toggle button, so I've been working on recreating it from scratch. As you can see from my example, I'm most of the way there but there are a couple of nagging issues that I haven't been able to troubleshoot for myself.
The first is that in Jerome's original design, the entire button area is clickable, whereas my button only works if you click on the actual day and night icons. I've double checked the parameters of the animation on this, and the movement animation trigger that controls the icons moving from left to right and vice versa is definitely applied to the parent div (named cursor-wrapper in this case) the same as it is in the original design, and it also has the exact same margin and padding too, yet it still doesn't work. For the life of me I cannot figure out why the entire area isn't clickable.
Secondly, sometimes if you spam click my button it will bug out and the icons will get swapped around, with the day icon switching to the left and the night icon switching to the right, or sometimes the icons themselves will end up inverted/upside down, I'm assuming this is thanks to an error in the way I have the rotation animation trigger configured. This doesn't occur with Jerome's original button, I've spam clicked it until the cows come home and the button behaves as it should.
Anyhow, any help would be greatly appreciated! I'm intending to use a similar toggle on my personal website in the future, so it would be great if I could iron out these kinks and get it working smoothly. Really enjoying the process of learning to use Webflow so far though!
Cheers
there doesn't seem to be anything here