I'm trying to automate the selection of items (using jQuery) from the autocomplete dropdown of the google maps api v3 places library. I am unable to determine the javascript required to select the item from the dropdown.
So, for example, here are the steps required to complete a partial field and trigger the dropdown for something like google's demo of this resource:
[EDIT the following code updated to show solution...]
$('input[name=address]').val("525 Bergen Street");
$('input[name=address]').trigger("focus");
$('input[name=address]').simulate("keydown", { keyCode: $.ui.keyCode.DOWN });
$('input[name=address]').simulate("keydown", { keyCode: $.ui.keyCode.ENTER });
[EDIT...see Engineer's reference to simulate, below.]
Any suggestions would be greatly appreciated, thanks,
Lille