WordPress.org

Forums

Responsive toggleClass active Menu Nav — toggle not working (3 posts)

  1. angeladesign
    Member
    Posted 1 year ago #

    This jquery script works great on my none wordpress site: angelaschmidtdesign.com but fails to toggle the active in my wordpress site: forms.angelaschmidtdesign.com

    Thoughts on what is going on? Thanks!

    <script>
    jQuery( document ).ready( function( $ ) {
    
    	 $('nav#menu > ul > li').addClass('has-submenu');
    
    		$('body').addClass('js');
    		  var $menu = $('#menu'),
    		  	  $menulink = $('.menu-link'),
    		  	  $menuTrigger = $('.has-submenu > a');
    
    		$menulink.click(function(e) {
    			e.preventDefault();
    			$menulink.toggleClass('active');
    			$menu.toggleClass('active');
    		});
    
    		$menuTrigger.click(function(e) {
    			e.preventDefault();
    			var $this = $(this);
    			$this.toggleClass('active').next('ul').toggleClass('active');
    		});
    
    });
    </script>
  2. Altaf Hussain Patel
    Member
    Posted 1 year ago #

    toggle is working when i check it using responsive...

  3. angeladesign
    Member
    Posted 1 year ago #

    This is what I get in all of my testing (cache is cleared too): http://angelaschmidtdesign.com/images/menu.jpg

    Logo Design and Web Design should not appear until services is clicked/tapped.

    Do you get the same thing? Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic