Jump to content

Event Inheritance

Guest twigg

Recommended Posts

When nesting tags like such:<div onMouseOut="doSomething"> <div onMouseOver="doSomethingElse">bla bla</div> <div onMouseOver="doSomethingAgain">ha ha</div></div>will the parent <div> tag be applied to the child <div> tag? In other words, if I place my mouse over "bla bla" and move down to "ha ha", will the "onMouseOut" event be triggered as soon as my mouse moves out of "bla bla?"I ask because I'm trying to creat a drop down menu. I have set my page up so that when I click the menu name and place my mouse over the submenu the submenu will become underlined. However, when I try to go to the next submenu directly beneath it, the entire submenu disappears.

Link to comment
Share on other sites

the container elements wont scale to the size of the contained elements... least it shouldnt by W3 standards(I think). An easy way to see this is by just throwing a border: 1px red solid;on your container so you can see exactly how it behaves.I recently made a drop down menu system and had to create a varaible in javascript that said var overMenu returns 1 or 0 and just put onmouseover="overmenu=1" onmouseout="overmenu=0". But then I don't know what the behavor of your menus is. This works well if you're trying to a simulate windows dropdown menu style.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...