News:

Support the VirtueMart project and become a member

Main Menu

Virtuemart Category Menu Module

Started by saviB, June 08, 2015, 21:15:12 PM

Previous topic - Next topic

saviB

Joomla! 3.3.6
VirtueMart 3.0.9

Using VirtueMart Category module. Top level categories have the category title and a down arrow on the right side. The down arrow slides open the children. The category title loads the category view. I'd like the down arrow accordion action to be called from the category title - eliminating the loading of the category view on title click.

Can someone point out the necessary code change? I assume it needs to take place in Assuming an override of mod_virtuemart_category/default.php - I just don't know which part to change.

Thanks -

GJC Web Design

something like

jQuery(document).ready(function() {
      jQuery('#VMmenu".$ID." li.VmClose ul').hide();
      jQuery('#VMmenu".$ID." li a').click(
      function(e) {

         if (jQuery(this).parent().next('ul').is(':hidden')) {
            jQuery('#VMmenu".$ID." ul:visible').delay(500).slideUp(500,'linear').parents('li').addClass('VmClose').removeClass('VmOpen');
            jQuery(this).parent().next('ul').slideDown(500,'linear');
            jQuery(this).parents('li').addClass('VmOpen').removeClass('VmClose');
                                 e.preventDefault();
         }
      });
   });

might work  ...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

balai