jQWidgets Forums
jQuery UI Widgets › Forums › Navigation › Menu, Context Menu › Problem with link in menu items?
Tagged: jQuery Menu
This topic contains 15 replies, has 3 voices, and was last updated by Peter Stoev 11 years, 8 months ago.
-
Author
-
I have some menu items in a menu bar:
<div id="mainMenu" style="-moz-border-radius: 0px; -webkit-border-radius: 0px; border-radius: 0px; float: left; border-width: 0px"> <ul> <li style="cursor: default">Language <ul> <li><a href="main.php?language=english">English</a></li> <li><a href="main.php?language=german">German</a></li> </ul> </li> <li><a href="logout.php">Logout</a></li> </ul> </div>
This works correctly except when I click slightly off of the text in the menu item.
For example, if I click on the text ‘Logout’, it works. If I move the cursor between the ‘Logout’ text and the edge of the menu item’s box it loads the page in a new tab.The code above appears to be the way to do it but I am not sure what is causing this to happen. Can you suggest anything?
Hi zircon,
Which version of jQWidgets and jQuery do you use?
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comSorry, I forgot to mention that. I am using jQWidgets 2.5.0 and JQuery 1.8.2 although I have just tried with jQWidgets 2.6 and it does not appear to make a difference.
Hi zircon,
Unfortunately, we are unable to reproduce the reported behavior with jQWidgets 2.6.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks. I have updated to 2.6 and it seems to have solved the problem. However, the menu items appear to slide behind windows.
I have a simplified demo here: http://www.shodokan.net/index.php?language=en
I have removed as much as I can and this uses jQWidgets 2.6 without any changes. I assume this has something to do with z-indexes but cannot understand why this would happen by default.
Do you know what I would need to change?Hi zircon,
Clicking on an item and the item’s edge leads to the same behavior. In addition, the Window below the menu has higher z-index by design. That is the reason why the sub-menus are opened behind the window. As far as I can see, the Window on your page is static and may be it would be a good idea to use a different widget like an Expander for static content.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comYes, the link problem is solved.
The window does not contain static content, this is a chopped down version for this demo, so I need to use a window in this place. What can I do to ensure the sub-menus always appear on top of the windows?
Is there an amendment to the .js or .css that will force the submenus above the windows?
Hi zircon,
By design, the jqxWindow’s zIndex is higher than the zIndex of the other widgets. We will consider adding API for changing the zIndex through a property, but at present, that is not possible.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comAll I need is a manual amendment to the css or js to force the submenus on top.
I would think this may be useful to others to have submenus appearing in front of windows. If you can let me know what manual edit is required in the .css or .js to force this, that would be very helpful. Thanks.
Can anyone assist with this? Thanks.
Hi I am using the version 2.8.3. I have the same problem as the orginial first post in this thread. If I click on the text of the link then action takes place. If I click between the logout text and the edge of the menu box then nothing happens. I dont remember this issue in the previous version. Can some one help with this issue please?
Hi,
The current version is 2.9. You may consider upgrading to it.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comI upgraded to 2.9.1. Still the problem exists. Please help in resolving this. Thanks!
-
AuthorPosts
You must be logged in to reply to this topic.