templaza / astroid-framework

Powerful framework for designers and developers to create responsive, fast & robust Joomla based websites and templates.
https://astroidframe.work/
GNU General Public License v3.0
77 stars 12 forks source link

multiple megamenu in website #594

Closed babakhakimi closed 3 months ago

babakhakimi commented 3 months ago

i use mod_astroid_menu multiple time in my site and I want to change data-asteroid-trigger for each module, but the settings of the first module are executed for all modules

you use $('[data-megamenu]').JDMegaMenu(); in your js file

media/astroid/js/megamenu.js

but this code only work for the first menu

please change that to

  $('[data-megamenu]').each(function() {
     $(this).JDMegaMenu();
  });
sonvnn commented 3 months ago

Thank you! I will fix it.

sonvnn commented 3 months ago

@babakhakimi I updated your change in megamenu.js here https://github.com/templaza/astroid-framework/commit/c74839b9c7471375fd661c2f3b1d090652193ea6

You can download v3-branch and test it.

Thanks & Best Regards, Sonny