I whipped up a demo. http://www.commadot.com/jquery/hoverIntent/menu.htm
Some pointers: 1. You only need one ready block. No need to make one for every single call. 2. Use CSS classes. Avoid ID's. jQuery is much easier to work with when your page has no ID's on it. CSS is super powerful. jQuery and CSS are like "slicing" and "bread". You just cant do one without the other. By using CSS, I eliminated 90% of your code. Redundancy is bad for maintenance. My code actually could be even shorter. 3. Use HTML instead of images for the links. It doesn't look sharp. It's very bad if I wanted to increase font size (poor eye sight). Its less flexible. You can get almost an identical look using Arial in this case. Ok, enough picking on you. Getting used to jQuery is a big first step. But once you do, you will open up tremendous doors for your users. Glen On 9/6/07, ldexterldesign <[EMAIL PROTECTED]> wrote: > > > also is there any way to make my jquery code a bit leaner? i assume > that's really sloppy code there??! > > On Sep 6, 8:06 pm, ldexterldesign <[EMAIL PROTECTED]> wrote: > > right guys, hopefully you're still about and can provide some back-up > > on this one. > > > > i've taken into consideration and implemented both points, although i > > have the funny feeling doing both has cancelled each of your much > > appreciated solutions out. my code is much leaner, cleaner, and valid > > - so pat yourselves on the back for me. > > > > have another look if you'd be so kind (and anyone else that happens to > > check out this topic tonight) and see if you can think of/suggest a > > solution to the problem of my secondary nav disappearing before i get > > the chance to select a link: > http://www.personal.leeds.ac.uk/~scs4ll/index.html > > > > many thanks, > > lewis > > > > On Sep 6, 12:00 am, ldexterldesign <[EMAIL PROTECTED]> wrote: > > > > > thanks guys, i'll try implementing both of your ideas and get back to > > > this thread once i have some resolve. > > > > > for anyone that checked my url above - the files have been overwritten > > > since i received these two responses, so i don't expect anyone to make > > > much sense of what's there now. > > > > > big up, > > > lewis > > > > > On Sep 5, 8:11 pm, Renaud <[EMAIL PROTECTED]> wrote: > > > > > > Just my two cents, but changing your html structure could solve a > lot > > > > of problems, including this one. > > > > > > Imho, each one of you *_set_navigation ul should be children of your > > > > #primary navigation items, e.g: > > > > > > <li id="home" href="#" alt="Home" title="Home">home</a> > > > > <ul id="home_set_navigation" class="hide"> > > > > <li><a id="home_latest" href="latest" alt="Latest news" > > > > title="Latest news">our latest</a></li> > > > > <li><a id="home_reviews" href="music_reviews" alt="Music > > > > reviews" title="Music reviews">reviews</a></li> > > > > <li><a id="home_listen" href="listen" alt="Listen now!" > > > > title="Listen now!">listen live!</a></li> > > > > > > <li><a id="home_competitions" href="competition" > > > > alt="Competitions" title="Competitions">competitions</a></li> > > > > <li><a id="home_get_involved" href="get_involved" > alt="Get > > > > involved" title="Get involved">get involved</a></li> > > > > <li><a id="home_calendar" href="calendar" alt="Calendar" > > > > title="Calendar">calendar</a></li> > > > > </ul> > > > > </li> > > > > > > That way hovering over the secondary navigation for this item wont > > > > 'mouseout' the primary <li>. That will take some adaptation on the > CSS > > > > but I think that's worth it. > > > > That way as well, clients that do not support css/javascript can > still > > > > have a menu that has some meaning, instead of two separate menus. > > > > > > Regards, > > > > Renaud Drousies > > > > > > On 5 sep, 14:47, ldexterldesign <[EMAIL PROTECTED]> wrote: > > > > > > > i think you can all see what i'm trying to do here: > http://www.personal.leeds.ac.uk/~scs4ll/index.html > > > > > > > i've coded up the 'home' and 'schedule' buttons as best i can > (using > > > > > the hover event). it would be nice if the secondary nav stayed up > long > > > > > enough for me to navigate it though. > > > > > > > any help would be much much appreciated. even a kick in the right > > > > > direction. > > > > > > > cheers, > > > > > lewis > >