Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Thanked 0 Times in 0 Posts

    Question How do I emulate a mouse over event?

    Hi, I got an issue with javascript. I need to enable keyboard navigation for a list of links, so that pressing UP/DOWN arrow keys acts like you put your mouse over the previous/next link. I allready have acomplished "lighting" the links by defining some "fake" mouse over style in CSS (that is applied to the link when you select it with the cursor keys) like this:

    a.linklist:hover, a.linklist:active, a.keyboardSelected:link, a.keyboardSelected:visited {...;...;...}

    The truoble I've got now is that some links are too long to fit in the list, so I shortened the link text and did put the full link in the "title" attribute of the link. This makes appear the full link as a tooltip when you hoover with your mouse over the link, but (as expected) the tooltip doesent appear when you select the link with the keyboard arrows. I have allready considered using javascript tooltips, but I would preffer the standart "title" tooltip because I don't want to add much more "weight" to my script.

    Does anybody have an idea about how to emulate an onMouseOver() event or how to force the "title" tooltip to appear on certain event?

    If you need some more of my code, just tell me.

    Thank you for your time.

    Joder Illi

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Between DC and Baltimore In a Cave
    Thanked 94 Times in 88 Posts
    You are going to have to develop or use a tooltip script.

    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts