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

What is Framer? Join the Community
Return to index
Christopher von Boisterous
Posted Feb 15 - Read on Facebook

Hey everyone, I´d love to initialize a function or alternatively put a delay on a function. The basic idea ist each time you click somewhere on the the document a timeout function is triggered and after 5 seconds a state is switched to a different state. The important thing is when you click on the document during the 5 seconds the timeout should be set to 5 seconds again. I don´t get how to handle this problem. Would be nice if anyone of you has a solution :) THANK YOU


Jonas Treub

There is a utility function that does exactly that:

Christopher von Boisterous

Jonas Treub Thank you :) But I´ve still the problem that i have to "kill" the function and restart it again when there is a click during the 5seconds. Or i just don´t get it :( sorry

Jonas Treub

Wait. You'll probably want to use debounce instead of throttle

Read the entire post on Facebook