Add custom accordion in magento2 using requiredjs

This post will show you how to add custom accordion in magento2.

Add html

Add the following code in the path app/design/frontend/Vendor/theme/Magento_Theme/templates/html/test.phtml

Add custom accordion

Refer the post to add custom js and add the below code in it.

If you want to add toggle add the following code in the path app/design/frontend/Vendor/theme/Magento_Theme/templates/html/test1.phtml

In your custom js add the below code

Share this article

Leave a comment