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

    To link sub level menus to their pages:

    1. Open file Enigma Theme/js/enigma_footer_script.js.

    2 Paste the following code at the end of this file.

    jQuery(".nav .dropdown-toggle").click(function () {
      window.location = jQuery(this).attr('href');
    });

    save the changes.

    If you face any problem, let me know for further assistance.

    Thanks.

    I have the same problem with the Menu.
    I followed the instruction, but it did not work. Any other suggestion. My file enigma_footer_script.js. code is below:

    //scroll js

    jQuery().waypoint && jQuery(“body”).imagesLoaded(function () {

    jQuery(“.animate_afc, .animate_afl, .animate_afr, .animate_aft, .animate_afb, .animate_wfc, .animate_hfc, .animate_rfc, .animate_rfl, .animate_rfr”).waypoint(function () {

    if (!jQuery(this).hasClass(“animate_start”)) {

    var e = jQuery(this);

    setTimeout(function () {

    e.addClass(“animate_start”)

    }, 20)

    }

    }, {

    offset: “85%”,

    triggerOnce: !0

    })

    });

    // photobos js

    jQuery(‘.enima_photo_gallery’).photobox(‘.photobox_a’);

    // or with a fancier selector and some settings, and a callback:

    jQuery(‘.enima_photo_gallery’).photobox(‘.photobox_a:first’, { thumbs:false, time:0 }, imageLoaded);

    function imageLoaded(){

    console.log(‘image has been loaded…’);

    }
    jQuery(“.nav .dropdown-toggle”).click(function () {
    window.location = jQuery(this).attr(‘href’);
    });

    Hi,

    I think its running well.

    Have you made any changes into your core theme directory.

    Or it may be cause of plugin conflict-ion.

    So please deactivate all the plugins if you are using.

    Please provide the site URL.

    Thanks

    Thank you for your suggestions. I do not believe, I changed the core of the theme before the menu problem started. I deactivated all the plugins. and modified the .js file per above instruction. No change.
    Please visit
    https://www.caraccidentcare.com/submenu-test-page/
    Test in the menu does not load.

    I appreciate any help.

    Please also visit
    https://demo.weblizar.com/enigma-free-theme/page-b/

    Page A does not load
    Page level 2 does not load

    Please fix this problem on your own site and let us know how it can be done.
    Best regards and gratitude.

    Hi,

    Sorry for late reply.

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

    Now open “menu.js” file into any text editor.

    Copy the code from this LINK and paste into “menu.js” file of your core

    theme directory.

    Now save the changes.

    Thanks.

    Hello,

    Thank you for the suggestion; however, the link does not work. I get:
    The web address you entered could not be found[more information]
    You were trying to go to https://pastebin.com/DMPZCnS3

    Would you please provide the code directly or via another link?
    Where should I paste the code? In the bottom of file perhaps?

    Thank you

    Hi,

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

    And replace the whole code with this:

    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();
                                                },
                                        });
                                }
                        }
                        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 changes.

    Thanks

    it works, now I want to “close” or “disappear” the drop down after the mouse lose the focus on the option that have sub menus

    my website: claropasto.com

    you put or focus the mouse on the “Televsion” menu, the dropdown with submenu appears, but it doesn’t disappear, how I do that??, I have to clic on another side of the page, but the final user / clients doesn’t want to do that

    thanks

    Problem Fixed.
    Great job on the menu code and great support.

    Thank you very much. I replaced the code of menu.js and menus are working great with no problem. It “close” or “disappear” the drop down after the mouse lose the focus on the option that have sub menus. claropasto.com menus looked fine to me and closed the submenus too.

    See the results at:
    caraccidentcare.com

    Hi daemonicus,

    You can improve your code with this:

    Again replace the “menu.js” file code which is given below:

    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);
    });

    Now save the changes.

    Thanks

    I replace the menu.js file with yours, now I lose the dropdown feature ??

    Hi daemonicus,

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

    and replace the whole code with given below line of code:

    The code is here:

    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 changes.

    Thanks.

    Hey, I still have the problem that I can not click the item itself when it holds a submenu. I tried the several menu.js codes you were posting here. Pls have a look:

    https://sanito.org

    thanks a lot

    still doesn’t work like I want

    first when page is open the drop down feature doesn’t work, only works if I click on it, but this open the page, once open I have to clic for the dropw down list appear….

Viewing 15 replies - 1 through 15 (of 29 total)
  • The topic ‘Meun not working’ is closed to new replies.