We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    Here is an example for setting Magento 2 collapsible widget in custom div by using a script.

    <div class="wraperdiv">
    <h4>Title</h4>
    <ul data-role="content">
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    <li><a href="">Link</a></li>
    </ul>
    </div>
    <script>
    require(['jquery', 'mage/collapsible'], function($) {
     $(".wraperdiv").collapsible({"header": "h4", "content": "ul", "openedState": "active", "active": true});
    });
    </script>

    you can use this script in your any phtml files or js script you can set on your theme js file.

    field_5bfb909c5ccae

      Get a Free Quote