473,657 Members | 2,567 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to build a JQuery menu using a list element?

347 Contributor
I am trying to build a JQuery menu using a list element.

I can get the elements to appear when my mouse hovers over the top button but they dissapear before i can get to the sub menu buttons

JQuery is as follows

Expand|Select|Wrap|Line Numbers
  1.       $(document).ready(function(){
  2.  
  3.         // Hide all unordered lists that are descended from the navigation
  4.                 $("#artistnav ul").hide();
  5.     });
  6.  
  7.     $(window).load(function(){
  8.         $('#artistnav a').bind('mouseover', function(){
  9.  
  10.       // on clicking the link get the parent li then find the first ul you can and display
  11.  
  12.       $(this).parents("li:first").find("ul:first").toggle();
  13.       //return false;
  14.  
  15. });
  16.     });
the html code is as follows

Expand|Select|Wrap|Line Numbers
  1. <div id="artistcats">
  2. <ul id="artistnav">
  3. <li><a href="boys2.asp?id=368&voicetype=All"><img src="http://bytes.com/submit/images/voicetypes/tabs/mainpage_up.png" alt="Main Page" class="thumb" id="mainpage" onMouseOver="MM_swapImage('mainpage','','../images/voicetypes/tabs/mainpage_dn.png',1)" onMouseOut="MM_swapImgRestore()"></a>
  4. </li>
  5.  
  6. <li><a href="javascript:void(0)"><img src="http://bytes.com/submit/images/voicetypes/tabs/Ages_up.png" alt="Ages" class="thumb" id="Ages" onMouseOver="MM_swapImage('Ages','','../images/voicetypes/tabs/Ages_dn.png',1)" onMouseOut="MM_swapImgRestore()"></a>
  7.   <UL>
  8.  
  9.  <li><a href="boys2.asp?id=368&voicetype=40s">40's</a></li>
  10.  
  11.  
  12.           </UL>
  13.           </li>
  14.  
  15. <li><a href="javascript:void(0)"><img src="http://bytes.com/submit/images/voicetypes/tabs/UK Accents_up.png" alt="UK Accents" class="thumb" id="UK Accents" onMouseOver="MM_swapImage('UK Accents','','../images/voicetypes/tabs/UK Accents_dn.png',1)" onMouseOut="MM_swapImgRestore()"></a>
  16.   <UL>
  17.  
  18.  <li><a href="boys2.asp?id=368&voicetype=Neutral">Neutral</a></li>
  19.  
  20.  
  21.           </UL>
  22.           </li>
  23.  
  24. <li><a href="javascript:void(0)"><img src="http://bytes.com/submit/images/voicetypes/tabs/Styles_up.png" alt="Styles" class="thumb" id="Styles" onMouseOver="MM_swapImage('Styles','','../images/voicetypes/tabs/Styles_dn.png',1)" onMouseOut="MM_swapImgRestore()"></a>
  25.   <UL>
  26.  
  27.  <li><a href="boys2.asp?id=368&voicetype=Authoritative">Authoritative</a></li>
  28.  
  29.  
  30.  <li><a href="boys2.asp?id=368&voicetype=Documentary/Corporate">Documentary/Corporate</a></li>
  31.  
  32.  
  33.  <li><a href="boys2.asp?id=368&voicetype=Presenter/DJ">Presenter/DJ</a></li>
  34.  
  35.  
  36.           </UL>
  37.           </li>
  38.  
  39. </ul>
  40. </div>
I also am trying to set a width of the menu items to be wider than the buttons at the top of the memu i have set it wider in CSS but it moves all the buttons across

The page can be seen here

http://www.yaketyyak.co.uk/newpages/...&voicetype=All

many thanks

colin
Mar 4 '13 #1
2 1739
gits
5,390 Recognized Expert Moderator Expert
i followed the link and it works - tried it with chromium 24 - is there still an issue with that?
Mar 7 '13 #2
colinod
347 Contributor
Hi yes i have sorted that used a different jquery code i found!!!

thanks
Mar 7 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1542
by: shapper | last post by:
Hi, I have the following layout: http://www.27lamps.com/Beta/Menu/Menu.html It includes a JQuery menu based on SuckerFish: http://alistapart.com/articles/dropdowns The p tag after the menu is not really after the menu. And the p Logo is pushed to the right.
9
1779
by: Anic297 | last post by:
Hello, I'm a newbie in php. I would like to show a popup menu on my website and update the page when the user has changed its selection. I have looked over the Internet but haven't found what I want (apparently, "Popup menu" is not the correct term, but it's the one I use in "desktop" programming). Can someone point me in the right direction?
53
8370
by: souporpower | last post by:
Hello All I am trying to activate a link using Jquery. Here is my code; <html> <head> <script type="text/javascript" src="../../resources/js/ jquery-1.2.6.js"</script> <script language="javascript" type="text/javascript">
17
13577
by: Nyris | last post by:
I have this code used for the navigation on an HTML page. It's an accordion style dropdown menu. Everything works fine I just need to change it so that the submenuheader class allows it to be a clickable link. Right now all that happens with for example Home has two submenus of About Us and Quality. When you click home it expands the dropdown. But I want it to expand and also direct to a Home page. thanks in advance! var ddaccordion={...
2
4175
by: dharmbhav | last post by:
Hello all, I am trying to develop a roll-over menu effect on a page. It works fine with all other browsers except IE6. Can some one please help me? HTML: <div class="menu-item-wrap"> <a href="#" class="menu-item-text"> Menu1 </a>
0
2123
by: rjoseph | last post by:
Hi Guys Does anyone know of any simple/basic jquery vertical accordion scripts that allow me to place a html table in the info section (ie the window that pulls down and displays the hidden content)? I have found loads of examples of accordion scripts out there but none allow me to show and hide a simple html <table>. My current JQuery UI accordion script only allows me to put in text within <p> tags. I have tried replacing the <p>...
0
2197
by: buzzard724 | last post by:
Ul li drop down menu works in FF not quite in IE Thank you for looking at this. The page is generated dynamically by php, js and jquery. The drop down menu ul- reports-li - works fine in FF. In IE7 the menu displays and if I am very very careful with how I move the mouse I can sometimes manage to catch the submenu - particularly the first time the page is displayed. Usually the menu disappears before I can mouse over it. I guess this is...
1
1765
by: Qaisar Hayat | last post by:
I have a home page from where I call another page insertfrm.php through Ajax. The problem is that insertfrm.php works fine when loaded directly in browser but does not work when loaded through ajax in div on home page. home.php <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type"...
0
1297
by: Stuart Hunter | last post by:
Hello, I am currently developing a Joomla site with a YOOtheme template 'Neo' and I'm finding the menu a little too 'quick to appear' on MOUSEOVER and I would really like a delay of around 0.5-1 second before the dropdown menu appears. Something along the lines of this. The YOOtheme support is somewhat limited, and I have got as far as having to change a line of code from: $('#menu').dropdownMenu({ mode: 'slide', dropdownSelector:...
1
3138
by: omar999 | last post by:
hi guys i really dont understand where i am going wrong.I've read countless articles including http://blog.nemikor.com/2009/10/03/using-multiple-versions-of-jquery/ but still having trouble with multiple versions of jquery not working. either the jquery slideshow doesnt work or the jquery ie select width fix doesnt work! rrghhh <head> <link href="/css/styles.css" rel="stylesheet" type="text/css" /> <script type="text/javascript"...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8730
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7321
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.