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

What is Framer? Join the Community
Return to index
Jochen Leinberger
Posted Apr 19 - Read on Facebook

Hi,
is there a way to listen on multiple events?
I tried:
headline.onTap or headline.onClick (event, layer) ->

but it did not work ...

3 Comments

Chris Camargo

You can't combine listeners like this. You need to write one for each event you want to listen to.

Kim Does

But you could then write one function that deals with each of these events.

Jochen Leinberger

OK so this should work:
headline.onTap (event, layer) ->
doIt(layer)

headline.onClick (event, layer) ->
doIt(layer)

doIt = (layer) ->
print layer.name

Read the entire post on Facebook