I am trying to achieve the result when i am typing inside input the list will drop down. if the list is clicked then will give out an alert. in the same time if the input is focus out , it will hide the list. But the problem is when on click , it doesn't work.
$("input").on("keyup",function(){
$(".abc li").show();
});
$(".abc li").on("click",function(){
alert("123");
});
$("input").focusout(function(){
$(".abc").find("li").hide();
});
Reference to my code http://jsfiddle.net/8t7erade/