javascript - add click event to auto complete -


this autocomplete code :

<link href="jostejufile/css/jquery.autocomplete.css" rel="stylesheet" type="text/css" /> <script src="jostejufile/scripts/jquery-1.4.1.min.js"></script> <script src="jostejufile/scripts/jquery.autocomplete.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () {     $("#<%=txtsearch.clientid%>").autocomplete("handler/search_cs.ashx", {         width: 200,         formatitem: function (data, i, n, value) {             return "<img  style = 'width:50px;height:50px' src='prupload/" +              value.split("-")[1] + "'/>" + value.split("-")[0];         },          formatresult: function (data, value) {             return value.split("-")[0];         }     }); }); </script>   <asp:textbox id="txtsearch" runat="server"></asp:textbox> 

i want fire event on click or selection of item autocomplete list.can please me out this?

you can add code select event in autocomplete:

i.e.

$( ".selector" ).autocomplete({   select: function( event, ui ) {} }); 

reference: http://api.jqueryui.com/autocomplete/#event-select


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -