vmitsaras/js-offcanvas

what is $(document).trigger("enhance")

cekvenich opened this issue · 2 comments

What does that do? Should we use it?

tia.

It's required only for the HTML-Auto-Init on DOM-Ready

Example

<aside class="js-offcanvas" 
       data-offcanvas-options='{"modifiers": "left,overlay"}' 
       id="off-canvas-id">...</aside>
<script>
 // you have to trigger enhance
   $( function(){
       $(document).trigger("enhance");
   });
</script>

thx! (ps we are using it on projects here: blog.metabake.org )