- Posts: 198
- Thank you received: 0
Menu items with submenus require two clicks
-
Danimeeka
Active member - Topic Author
- Member
Less
More
8 years 6 months ago #46625
by Danimeeka
Menu items with submenus require two clicks was created by Danimeeka
Hi,
My site is at www.lmslawyers.com.au/joomla . I have noticed that the Practice Areas menu and the Contact menu items (both of which have submenus) need to be clicked twice before they display the required page. Menu items with no submenus only need one click.
How can I make all menu items work with only one click?
Thanks,
Julia.
My site is at www.lmslawyers.com.au/joomla . I have noticed that the Practice Areas menu and the Contact menu items (both of which have submenus) need to be clicked twice before they display the required page. Menu items with no submenus only need one click.
How can I make all menu items work with only one click?
Thanks,
Julia.
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
Less
More
- Posts: 6744
- Thank you received: 716
8 years 6 months ago #46626
by milos
Replied by milos on topic Menu items with submenus require two clicks
Hello,
Edit file /template/hot_flat/index.php and change this at the bottom of this file:
with this:
Regards,
Milos
Edit file /template/hot_flat/index.php and change this at the bottom of this file:
Code:
<script type="text/javascript">
var navigation = responsiveNav(".container_menu-en");
var navigation = responsiveNav(".container_menu-zh");
</script>
with this:
Code:
<script type="text/javascript">
<?php
foreach($mnucfg as $menu_name => $menu) {
if($menu['type'] == "navv"){ ?>
if( jQuery(".container_<?php echo $menu_name;?>").length ) {
var navigation = responsiveNav(".container_<?php echo $menu_name;?>");
}
<?php
}
}
?>
</script>
Regards,
Milos
Please Log in to join the conversation.
-
Danimeeka
Active member - Topic Author
- Member
Less
More
- Posts: 198
- Thank you received: 0
8 years 6 months ago #46628
by Danimeeka
Replied by Danimeeka on topic Menu items with submenus require two clicks
Hi Milos,
Perhaps because I have updated my template files with the latest version, my code originally read like this:
<script type="text/javascript">
<?php
foreach($mnucfg as $menu_name => $menu) {
if($menu == "navv"){ ?>
var navigation = responsiveNav(".container_<?php echo $menu_name;?>");
<?php
}
}
?>
</script>
I replaced it with your code, which, if I'm reading it correctly, essentially wrapped the main line in this IF statement:
if( jQuery(".container_<?php echo $menu_name;?>").length )
Anyway, the problem still exists. When you click any menu item that has submenus, the first click does nothing and a second click is needed.
Do you have any more suggestions?
Thanks,
Julia.
Perhaps because I have updated my template files with the latest version, my code originally read like this:
<script type="text/javascript">
<?php
foreach($mnucfg as $menu_name => $menu) {
if($menu == "navv"){ ?>
var navigation = responsiveNav(".container_<?php echo $menu_name;?>");
<?php
}
}
?>
</script>
I replaced it with your code, which, if I'm reading it correctly, essentially wrapped the main line in this IF statement:
if( jQuery(".container_<?php echo $menu_name;?>").length )
Anyway, the problem still exists. When you click any menu item that has submenus, the first click does nothing and a second click is needed.
Do you have any more suggestions?
Thanks,
Julia.
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
Less
More
- Posts: 6744
- Thank you received: 716
8 years 6 months ago #46630
by milos
Replied by milos on topic Menu items with submenus require two clicks
Hello,
Please re-download template from our site. Extract only this file:
/templates/hot_flat/library/menu_js.php
Upload it on your server and overwrite old file.
Thanks,
Milos
Please re-download template from our site. Extract only this file:
/templates/hot_flat/library/menu_js.php
Upload it on your server and overwrite old file.
Thanks,
Milos
Please Log in to join the conversation.
-
Danimeeka
Active member - Topic Author
- Member
Less
More
- Posts: 198
- Thank you received: 0
8 years 6 months ago #46639
by Danimeeka
Replied by Danimeeka on topic Menu items with submenus require two clicks
Thanks Milos. I have done that now but still no luck. Menu with submenus still won't do anything on first click.
Julia.
Julia.
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
Less
More
- Posts: 6744
- Thank you received: 716
8 years 6 months ago #46640
by milos
Replied by milos on topic Menu items with submenus require two clicks
Hello Julia,
Perhaps many other files of your template are outdated. Could you re-download template from our site and using FTP re-upload all template files from /templates/hot_flat folder (overwrite existing). You can omit all CSS files and all images though because you probably edited them.
Thanks,
Milos
Perhaps many other files of your template are outdated. Could you re-download template from our site and using FTP re-upload all template files from /templates/hot_flat folder (overwrite existing). You can omit all CSS files and all images though because you probably edited them.
Thanks,
Milos
Please Log in to join the conversation.
Time to create page: 0.085 seconds