October 2017
Intermediate to advanced
370 pages
8h 57m
English
What about multiple events? No problem, AMP's got you covered! You can attach further event handlers simply by appending them to the on attribute, separating each extra event with a semicolon:
on="event:target[.action][;event2:target2[.action2]...]"
This opens up all kinds of possibilities. For example, you could conditionally show elements based on a form success or failure submission event:
on="submit-success:message1.show;submit-error:message2.show"
Read now
Unlock full access