This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Ben Bate
Posted Sep 07 - Read on Facebook

Hi everyone,

Just trying to get to grips with the basics. I'm trying to get the add button to also close the menu after it has been tapped. Basically I want it to perform the same action as when the overlay is tapped. Could anybody help me understand how to do this?



Benjamin Den Boer

Hiya Ben Bate! Let's see — you can quite easily achieve this by using the next() method instead of switch(). So, now, every time you click the button, it tries to switch to the "on" state. Except, after the first time, it's already switched! So it doesn't do anything anymore. What next() does it "toggle" between the available states - in your case, "default" and "on". So on every click, it switches to the next state available. :-)

Ben Bate

Amazing. Thanks Benjamin Den Boer :) :)

Benjamin Den Boer

Sure thing. Nice work, btw! Looking forward to see more. :-)

Read the entire post on Facebook