First, I have only played with Prototype for about a month, so I don't
know it well. Second, I am more of a server-side programmer than a
client-side programmer.
In my page, I have a div that appears as a result of a link mouseover
event. This div is nested within another div that houses everything
(id = 'menuContainer'). I want the resulting div (which is a submenu)
to disappear when the user moves the mouse away from the container
div. I've done a lot of research. MouseEnter and MouseLeave do
exactly what I want them to do, but I don't know how to write these in
Prototype or even JavaScript. Alternately, I would want MouseOver and
MouseOut to not bubble down to their children.
Currently, I have the following code:
Event.observe('menuContainer', 'mouseout', function(e){
if (!e.descendantOf('menuContainer')) {
hideSubmenu( activeSubmenu );
activeSubmenu = '';
}
});
You guessed it. It doesn't work. I don't even know how to get access
to whatever element the mouse is currently over to check if it is a
descendent of 'menuContainer'.
It would be really nice if there were good Prototype resources out
there, but I can't find them. The API documentation on the site is
good, but it assumes you've already mastered previous versions of
Prototype. Which I haven't. Needless to say, I'm very frustrated.
I've spent all day looking for some solution and I cannot find
anything.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---