Chrome Extension

Add animation on hide/show section AMP accordion

If you want to add animation on show or hide of a particular section, then you can add the animate attribute to it.
<amp-accordion class="myaccordion" animate>
    <section>
        <h4>Section 1</h4>
        <div>Section 1 content will be here</div>
    </section>
    <section>
        <h4>Section 2</h4>
        <div>Section 2 content will be here</div>
    </section>
    <section>
        <h4>Section 3</h4>
        <div>Section 3 content will be here</div>
    </section>
</amp-accordion>
Code faster with devsheet chrome extension and increase productivity as a programmer
search code from your favorite search engine instantly.
Install Now

To add animation effect on AMP accordion section hide or show you can use 'animate' attribute on the 'amp-accordion' HTML element.

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

animate AMP accordion
Was this helpful?
0 Comments
Open Code Manager We are hiring