Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1086210

    I have made a filter that changes category of Portfolio gallery sort for the #anchor on the same page, but the problem is that Mega Menu stays on when item is clicked. What code should I use in the filter to make Mega Menu close when I click on an item?

    This is the filter I’ve made:

     function hash_select(){
      ?>
      <script type='text/javascript'>
    jQuery(window).on('hashchange', function() {
    	  var hash = window.location.hash.substr(1);	
    	jQuery('.'+hash+'_sort_button').click();
    });
    
    	  </script>
      <?php
      }
      add_action('wp_footer', 'hash_select', 110);
    #1086243

    UPDATE: Tried adding jQuery(".avia_mega_div").toggle(); to above code, but the mega menu just blinks.

    #1086841

    Hi MORTULGAAH,

    Can you give us a link to the page mentioned? so we can take a closer look and check further on the behavior of the added js script.

    Best regards,
    Nikko

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.