furtivevole
Technical User
I'm attempting some asp.net pages for the first time. In one situation, I have a list of items, and need to highlight the one that currently has the cursor over it. So far, so good:
This matches to a couple of css classes that define the highlight/normal appearance.
However what I would like to do is, when the user moves elsewhere on the page, retain the highlight of the last list item that received the onmouseover event, which I guess should be something like:
In other words, there is no onmouseout event - it's only when the user moves onto a new menu item that the old one gets set back. Unfortunately I'm having a total senior moment about the syntax of [menuitem2] etc in this example - tried lots of things and nothing works. ;-( Can someone give me a clue please!
Or is there a better way of achiving the result?
Thanks
Code:
<dl>
<dt id="menuitem1" onmouseover="this.className='menuitem_over';"
onmouseout="this.className='menuitem_out'">Some text</dt>
<dt id="menuitem2">... </dt>
....
</dl>
This matches to a couple of css classes that define the highlight/normal appearance.
However what I would like to do is, when the user moves elsewhere on the page, retain the highlight of the last list item that received the onmouseover event, which I guess should be something like:
Code:
<dl>
<dt id="menuitem1" onmouseover="this.className='menuitem_over'; [menuitem2].className='menuitem_out';[menuitem3].className='menuitem_out'; etc " >Some text</dt>
<dt id="menuitem2">... </dt>
....
</dl>
In other words, there is no onmouseout event - it's only when the user moves onto a new menu item that the old one gets set back. Unfortunately I'm having a total senior moment about the syntax of [menuitem2] etc in this example - tried lots of things and nothing works. ;-( Can someone give me a clue please!
Or is there a better way of achiving the result?
Thanks