Jquery autocomplete - how to add on click event to the list
<p>HI i am using the below code for population my autocomplete list. </p>

<pre><code>    $('#input').autocomplete({ ajax_get : get_roles});

    function get_roles(v,cont,roleName){
            var roleName = roleName.value;
            roleName = roleName.toLowerCase();
            $.get('/da/roleautocomplete?roleName='+escape(roleName),{q:v},
                function(obj){
                  var res = [];
                  for(var i=0;i&lt;obj.length;i++){
                    res.push({ id:i , value:obj[i]});
                  }
                  cont(res);
                },
                'json')
        }
</code></pre>

<p>I want to fire an event on the click or selection of an item from the autocomplete list. I have tried this -</p>

<pre><code>$('#input').autocomplete({
     select:function(event, ui){
          // do your things here
      }, etc.
</code></pre>

<p>but to no avail. Can anyone please help me out with this?</p>
