Chrome Extension

Add click event on element AMP

Click event can be assigned on an Element in AMP using on:tap event. It will fire by clicking the Element.
<div id="success-message">Successfully added data</div>

<button on="tap:success-message.hide">Click to hide message</button>
Code faster with devsheet chrome extension and increase productivity as a programmer
search code from your favorite search engine instantly.
Install Now

In the code snippet, we have assigned an on:tap event on an element that will fire when click on the element. In the code, we are hiding a message on the button click.

Search Index Data (The code snippet can also be found with below search text)

On tap AMP
Was this helpful?
0 Comments
Open Code Manager We are hiring