Demo of Autocomplete focus event in JQuery UI
Focus event message will be dispalyed here
focus event is triggerd when focus is moved out of an option of the menu.
Last selected option is dispalyed.
source: [ "PHP", "JQuery", "JavaScript", "HTML", "ASP", "Perl", "MySQL","Access","Excel","Dot Net" ],
HTML
<input id=auto_c>
jquery
<script>
$(document).ready(function() {
////////////////
$( "#auto_c" ).autocomplete({
source: [ "PHP", "JQuery", "JavaScript", "HTML", "ASP", "Perl", "MySQL","Access","Excel","Dot Net" ],
minLength:0,
focus: function( event, ui ) {
$('#d1').html( " <b>focus event is triggered: </b>" + $(this).val());
}
});
////////
})
</script>