Menu Auto Dropdown

General discussions about WebYep
Post Reply
stew
Posts: 3
Joined: Thu May 03, 2012 3:11 pm

Menu Auto Dropdown

Post by stew » Thu May 03, 2012 3:14 pm

HI

I was wandering is it possible for the webyep menu to be coded so that the submenus drop down automatically on mouseover rather than having to click?

I have been trying for a while with no luck!

Cheers in advance!

stew
Posts: 3
Joined: Thu May 03, 2012 3:11 pm

Re: Menu Auto Dropdown

Post by stew » Tue May 08, 2012 2:03 pm

Views 15, replies 0?

It is that difficult? Or just not do-able?

mjtempesta
Posts: 3
Joined: Sun Oct 04, 2009 2:48 pm

Re: Menu Auto Dropdown

Post by mjtempesta » Wed May 09, 2012 1:29 pm

Hi Stew.
You can use pure CSS. See this article: http://csswizardry.com/demos/css-dropdown/
This is easy to do with webyep, since the menu items are all tagged with classes. In the attached example, the CSS is referencing an Unordered List by an ID. Webyep won't generate an ID. So you can wrap the webyep menu in a div, then the CSS would be #DivID UL. Everything else would follow, just substitute your #DivID UL for #nav in that example.
I'm not sure if #DivID UL would select all UL, or just the first. I haven't had my coffee yet :) I'm almost positive it is just the first one, as the other UL would have a different parent (the list items they are nested under)
But, if needed, you could use #DivID UL:first-child, so that only the first instance of UL is selected.

Additionally, if you are using a library like jquery, you can also show and hide the child Unordered List by attaching an event handler to the parent list item.

I have a working example that I am building for a client, but I am unwilling to post the url until the client has approved it. The prototype has his company info on it.
If you want to PM me, I will give you the url. Once the site is approved and published, I will post the url for reference.
Hope this helps!
Mike

mjtempesta
Posts: 3
Joined: Sun Oct 04, 2009 2:48 pm

Re: Menu Auto Dropdown

Post by mjtempesta » Wed May 09, 2012 1:31 pm

Just realized you are probably referring to webyep's listJS menu, and not list style. I prefer the list output as I then style it. But if you are using listJS, it should be fairly easy to call the click event on hover. I will take a look today and post later this afternoon.

stew
Posts: 3
Joined: Thu May 03, 2012 3:11 pm

Re: Menu Auto Dropdown

Post by stew » Fri May 11, 2012 12:21 pm

Yeah i am using the listJS menu that's why it's confusing me a bit!

Not an expert at this but fairly experienced so a bit of guidance would be very helpful

Cheers for your help much appreciated!

Post Reply