- Posts: 9
- Thank you received: 0
Dropdown menu not opening
-
vespera
Inactive member - Topic Author
- New Member
Less
More
10 years 2 months ago #42397
by vespera
Dropdown menu not opening was created by vespera
Instead of using the Hot Explorer template, which completely messes up the front-end editing layout, I've decided to use the Sparky Pro (on Joomla 3.3.6) and style it similar to the hot_explorer. Everything works apart from the dropdown menu, it just doesn't open submenus on my desktop, or menus on the android tablet and mobile. I've tried to disable the Hot Full Carousel module in case there is a conflict, but this obviuosly isn't the problem. I've disabled jQuery loading in the module, and it makes no difference if I set jQuery UI loading in the Sparky settings to ON or OFF.
I did find a script error:
ReferenceError: invalid assignment left-hand side
www.site.net/ Line 185
jQuery.fn.dropDownMenu_en-menu = function(options) {
The error doesn't appear if I select horizontal or any other menu, and eventually, I've managed to resolve this error just by adding the second equality sign before the word "function" in menu_loader.php (around line 40):
(function(jQuery){
jQuery.fn.dropDownMenu_<?php echo $menu_name;?> == function(options) {
This resolves this error, but then another one takes it's place:
ReferenceError: menu is not defined
www.site.net/ Line 185
I'm not even sure that those script errors have something to do with the dropdown menu not opening, it looks like it could be something else. I also have hot_explorer installed, and the dropdown menu in this template works OK, but I've noticed that the menu code is not the same (in menu_loader.php, but also the dropdown menu part in jquery.hjt.hnav.js is not the same as the code in jquery.hjt.nav.js of the hot_explorer template. Since the dropdown menu is the only one that looks good with the full carousel, can you please help me to make it work in sparky pro?
I'm developing on a live server, so you can take a look at the site at traditionalsailing.net. Thank you!
I did find a script error:
ReferenceError: invalid assignment left-hand side
www.site.net/ Line 185
jQuery.fn.dropDownMenu_en-menu = function(options) {
The error doesn't appear if I select horizontal or any other menu, and eventually, I've managed to resolve this error just by adding the second equality sign before the word "function" in menu_loader.php (around line 40):
(function(jQuery){
jQuery.fn.dropDownMenu_<?php echo $menu_name;?> == function(options) {
This resolves this error, but then another one takes it's place:
ReferenceError: menu is not defined
www.site.net/ Line 185
I'm not even sure that those script errors have something to do with the dropdown menu not opening, it looks like it could be something else. I also have hot_explorer installed, and the dropdown menu in this template works OK, but I've noticed that the menu code is not the same (in menu_loader.php, but also the dropdown menu part in jquery.hjt.hnav.js is not the same as the code in jquery.hjt.nav.js of the hot_explorer template. Since the dropdown menu is the only one that looks good with the full carousel, can you please help me to make it work in sparky pro?
I'm developing on a live server, so you can take a look at the site at traditionalsailing.net. Thank you!
Please Log in to join the conversation.
-
vespera
Inactive member - Topic Author
- New Member
Less
More
- Posts: 9
- Thank you received: 0
10 years 2 months ago #42403
by vespera
Replied by vespera on topic Dropdown menu not opening
Sorry, I wrote the wrong link - the example site is at traditionalsailing.net/en/menu2
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
10 years 2 months ago #42409
by ivan.milic
Replied by ivan.milic on topic Dropdown menu not opening
This code :
in your header makes problem. It is not from sparky or it is present by default in joomla
Code:
window.setInterval(function(){var r;try{r=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}if(r){r.open("GET","./",true);r.send(null)}},1740000);
in your header makes problem. It is not from sparky or it is present by default in joomla
Please Log in to join the conversation.
-
vespera
Inactive member - Topic Author
- New Member
Less
More
- Posts: 9
- Thank you received: 0
10 years 2 months ago #42414
by vespera
Replied by vespera on topic Dropdown menu not opening
This is one of the things that Joomla loads by default (caption.js, along with mootools etc), and this piece of code went away when I disabled the login module on the page. Since there is a tool, like the Mootools enabler/disabler plugin, that can overcome the loading of unneccesary Joomla scripts, I think I've solved this part of the problem, but my dropdown menu still doesn't work.
What puzzles me the most is the fact that dropdown menu works in hot_explorer template (it was working even before I deleted this piece of code), but not in Sparky?
You can check it: I've assigned the hot_explorer template to the page www.traditionalsailing.net/en/menu2
and the original sparky template is on the home page traditionalsailing.net/en/. While one works the other doesn't. The script error is still there on Sparky page, while there is no error at hot_explorer page.
Maybe you can make some sense of this?
What puzzles me the most is the fact that dropdown menu works in hot_explorer template (it was working even before I deleted this piece of code), but not in Sparky?
You can check it: I've assigned the hot_explorer template to the page www.traditionalsailing.net/en/menu2
and the original sparky template is on the home page traditionalsailing.net/en/. While one works the other doesn't. The script error is still there on Sparky page, while there is no error at hot_explorer page.
Maybe you can make some sense of this?
Please Log in to join the conversation.
-
ivan.milic
Support Staff - Moderator
Less
More
- Posts: 14116
- Thank you received: 1639
10 years 2 months ago #42423
by ivan.milic
Replied by ivan.milic on topic Dropdown menu not opening
Try to take this file from explorer :
templates/hot_explorer/js/jquery.hjt.nav.js
templates/hot_explorer/js/responsive_menu.js
templates/hot_explorer/js/jquery.hjt.nav.js
templates/hot_explorer/js/responsive_menu.js
Please Log in to join the conversation.
-
vespera
Inactive member - Topic Author
- New Member
Less
More
- Posts: 9
- Thank you received: 0
10 years 2 months ago #42433
by vespera
Replied by vespera on topic Dropdown menu not opening
I already thought of that, but I suppose I need to reference those files somehow, at least in menu_loader.php, since Sparky is using jquery.hjt.hnav.js to create dropdown and horizontal menu, and the code is different. Copying the 2 files from hot_explorer is no problem, but how do I make Sparky use them? Can you help me there?
Please Log in to join the conversation.
Time to create page: 0.173 seconds