• Resolved vega2717

    (@vega2717)


    I actually have 2 questions:
    -The sub menus keep sticking when hovering
    -How do I turn off pagenation?

    Thanks in advance

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi,

    Go to your core theme directory >> Js folder >> menu.js .

    Open “menu.js” file into any text editor.

    Now copy the code from this LINK and paste into

    “menu.js” file of your core theme directory.

    Save the changes.

    For the second issue Go to Dashboard Admin Panel >> Appearance Menu >>

    Theme Options >> General Option >> Custom CSS.

    Now write below CSS rules into custom CSS box.

    .pagination{
    display:none;
    }

    Save the changes.

    Thanks.

    Thanks

    By menu “sticking,” do you mean that when you move your mouse away from the menu, it still stays down? In other words, it doesn’t collapse back to “normal” when you’re not hovering over it anymore?

    That is my problem. I tried following the steps above, but it did not fix the problem. Any suggestions?

    Site url is https://www.five-starnetwork.com

    Hi fivestarfisher,

    Please create a “Drop-Down” menu first.

    So that we can see your problem.

    Thanks

    Sorry! I forgot that all my drop-down menus are only visible to logged in members. I added a few pages to a drop down menu. The problem is that once I move my mouse away from the menu, it stays down, even if I click on a different part of the page.

    Hi,

    Please create child theme and create menu.js in child theme directory. Copy below code in menu.js

    jQuery(document).ready(function() {
    		var bMobile;  // true if in mobile mode
    		var isMobile;
    		// Initiate event handlers
    		function init() {
    			var isMobile = {
    				Android: function() {
    					return navigator.userAgent.match(/Android/i);
    				},
    				BlackBerry: function() {
    					return navigator.userAgent.match(/BlackBerry/i);
    				},
    				iOS: function() {
    					return navigator.userAgent.match(/iPhone|iPad|iPod/i);
    				},
    				Opera: function() {
    					return navigator.userAgent.match(/Opera Mini/i);
    				},
    				Windows: function() {
    					return navigator.userAgent.match(/IEMobile/i);
    				},
    				any: function() {
    					return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
    				}
    			};
    
    			var oMenus = jQuery('.navbar-nav  .dropdown'),nTimer;
    			if( isMobile.any() ) {
    				// Set up menu on click for Mobile and ipad mode
    				oMenus.on({
    				  'mouseenter touchstart': function(event) {
    					event.preventDefault();
    					clearTimeout(nTimer);
    					oMenus.removeClass('open');
    					jQuery(this).addClass('open').slideDown();
    				  },});
    				jQuery('ul.dropdown-menu li a').on('click touchend', function() {
    					var link = jQuery(this).attr('href');
    					window.open(link,'_self'); // opens in new window as requested
    					return false; // prevent anchor click
    				});
    			} else {
    				oMenus.on({'mouseenter touchstart': function(event) {
    					event.preventDefault();
    					clearTimeout(nTimer);
    					oMenus.removeClass('open');
    					jQuery(this).addClass('open').slideDown();
    					},
    					'mouseleave': function() {
    					nTimer = setTimeout(function() {
    					oMenus.removeClass('open');
    					}, 500);
    					}
    				});
    			}
    		}
    		jQuery(document).ready(function() {
    		  // Your other code to run on DOM ready...
    			jQuery(".nav .dropdown-toggle").click(function () {
    			window.location = jQuery(this).attr('href');
    			});
    		  init();
    		});
    		jQuery(window).resize(init);
    	});

    Save the file.
    Now create functions.php and copy below code in it.

    <?php
    function child_js(){
    	 wp_enqueue_script('menu_js',  get_stylesheet_directory_uri() .'/menu.js', array('jquery'));
    }
    add_action('wp_enqueue_scripts', 'child_js');
    ?>

    Save the Changes.
    Thanks

    That worked! Thank you!

    Hi,

    Most welcome.

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Sub-Menu and Active’ is closed to new replies.