I tried to use the change event but it didnt work... If someone already knows how to do this please write it!! =)
On 25 mar, 02:44, "wesley...@gmail.com" <wesley...@gmail.com> wrote: > Hi, > i have a question, > how to manually fire theautocompleteevent? > > <input type="text" id="acTxt" /> > <span class="pTxt">aa</span>, > <span class="pTxt">bb</span>, > <span class="pTxt">cc</span>, > <span class="pTxt">dd</span> ... > > $(document).ready(function(){ > $("#acTxt").autocomplete(theUrl, { > minChars: 2, > matchContains: true, > max: 20 > }); > > $(".pTxt").click(function() { > $("#acTxt").val($(this).html()? $(this).html():''); > }); > > }); > > if the user click on SPAN with class 'pTxt', the innerHTML of the SPAN > will place in the textbox, > how to activate theautocompletewithout pressing UP, DOWN, PAGE UP, > and ....?