handle multi jquery autocomplete -
i have put several autocomplete input box in same page, like
<input id=ipa ... <input id=ipb ... <input id=ipc ... $(ipa).autocomplete({...source:jsonp.php...data:{type:'aaa'}... $(ipb).autocomplete({...source:jsonp.php...data:{type:'bbb'}... $(ipc).autocomplete({...source:jsonp.php...data:{type:'ccc'}...
is there way combine them 1 ?!
thanks,
actually if want 3 autocomplete input boxes, need 3 jquery object of autocomplete class. if want reduce duplicate code, can create function input element id , datasource (or other parametrs need), call 3 times , store each 1 different variable.
Comments
Post a Comment