i finally figured this out after a lot of trial and error.

for keyboard navigation of the suggestions menus to work you must have a
style rule for the element li.ac_over defined i your css. i was astonished
when i discovered this but after reading the script i think i have a notion
how this can be.

anyway, there it is. put a rule for li.ac_over in your style sheet.


On 4/6/09 6:52 PM, "Tom Worster" <f...@thefsb.org> wrote:

> 
> I'm unable to make the keyboard selection of suggestions from the
> dropdown work in my project, otherwise it works fine and selection
> with the mouse is possible.
> 
> I'm using safari 3 and ff3. Keyboard selection in the demos is working
> fine, so this seems not to be a browser issue. I've checked that I
> have the newest jquery.autocomplete.js plugin code. I've checked
> through the API docs and demo code and can't find anything that seems
> to enable or disable keyboard selection. I'm stuck and would be
> grateful for help.
> 
> Here's the markup:
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
> www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <title>Test new suggest</title>
> <script src="jquery.js" type="text/javascript"></script>
> <script src="jquery.autocomplete.js" type="text/javascript"></script>
> <script src="suggest-test.js" type="text/javascript"></script>
> <link href="suggest-test.css" rel="stylesheet" type="text/css">
> </head>
> <body>
> <form method="post">
>   <label for="artisttext">Artist</label><br>
>   <p><input type="text" id="artisttext" name="artist" class="auto"></
> p>
>   <p><input type="submit" name="submitform" value="Submit"></p>
> </form>
> </body>
> </html>
> 
> And the script:
> $(document).ready(function() {
> $('#artisttext').autocomplete('suggest-test.php', {extraParams: {p1:
> 'as'} });
> $('.auto').setOptions({minChars: 2, delay: 200, max: 50});
> });


Reply via email to