Jump to content

Access key to hover ?!?


wright67uk

Recommended Posts

I would like to use an access key to simulate a mouse hover is this possible?

How is this done?

 

www.1pw.co.uk/accessmenu

 

I would like the menu in the link above to show by pressing ALT+M and then hideaway by pressing ALT+E.

 

<style type="text/css">
#A1{background:url(1.jpg) no-repeat;}
#image li a{width:30px; height:320px;display:block;float:left;}
#image li a:hover{width:450px; }
</style>
</head>

<body>
<ul id="image"><li><a id="A1" href="#"></a></li></ul>
</body>

 

PS anyone who followed my link.. whats with the black dot ( its not in my image! )  ?

Link to comment
Share on other sites

The dot is because you are using a ul, and you have a li in it, but you have not suppressed the default list style which you can do by styling the li items with:  list-style: none;  As for you key handling, you can attach an event handler to the document, and thanks to event bubbling, keypress events will bubble up to it.  JQuery has a .keypress() method as an example, with some information about how it facilitates determing which key was pressed here:  http://api.jquery.com/keypress/

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.