somewebmedia / hc-offcanvas-nav

JavaScript library for creating toggled off-canvas multi-level navigations, allowing endless nesting of submenu elements, supporting swipe gestures, keyboard interactions and ARIA attributes.
https://somewebmedia.github.io/hc-offcanvas-nav/
MIT License
336 stars 82 forks source link

is there a way to always show the logo on navTitle and close button on all levels? #89

Open bomsbong opened 2 years ago

bomsbong commented 2 years ago

First thanks for this awesome menu, would like to ask if it's possible to always show the logo on navTitle and close button on all menu levels? thanks

webgreat commented 2 years ago
<script>
$(document).ready(function($) {

  const wg_menu_image = document.createElement('img');
  wg_menu_image.setAttribute(
    'src',
    'path/to/image.png',
  );

  $('#wg_menu').hcOffcanvasNav({
    navTitle: wg_menu_image,
  });

});
</script>