Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AMP - Install multiple event handlers for tap

Tags:

amp-html

Is there a way to install multiple events for tap? E.g. on tap close the sidebar and open a lightbox?

Thanks.

like image 274
Emoke Ordog Avatar asked Oct 26 '16 09:10

Emoke Ordog


1 Answers

Handling multiple events You can listen to multiple events on an element by separating the events with a semicolon ;.

Example: on="submit-success:lightbox1;submit-error:lightbox2"

Multiple actions for one event You can execute multiple actions in sequence for the same event by separating the actions with a comma ','.

Example: on="tap:target1.actionA,target2.actionB"

like image 75
Jarosław Gilewski Avatar answered Sep 24 '22 14:09

Jarosław Gilewski