autocomplete, using both jquery and jquery UI version -
i wonder if javascript can see difference between autocomplete() of jquery , autocomplete() of jquery ui.
http://jqueryui.com/demos/autocomplete/
http://docs.jquery.com/plugins/autocomplete
i using both versions , atm jquery 1 works. due syntax errors or because functions can't used together??
$("#auto").autocomplete($("#base_uri").val()+'ajax/search',{ req_type: "post", minchars: 1, delay: 200 }).result(function(event, data, formatted) { $("#message-add").hide(); $("#auto").show(); $("#auto").focus(); $("#fake_to").append('<span id="'+data[1]+'">'+formatted+', '+'</span>'); $("#to").val($("#to").val()+ data[1] +', '); $("#auto").val(''); }); $(function() { var availabletags = [ "actionscript", "applescript", "asp", "basic", "c", "c++", "clojure", "cobol", "coldfusion", "erlang", "fortran", "groovy", "haskell", "java", "javascript", "lisp", "perl", "php", "python", "ruby", "scala", "scheme" ]; $( "#tags" ).autocomplete({ source: availabletags }); });
i'm sure using both of these cause conflict. think it--both take $.fn.autocomplete
function.
in other words, 1 include last 1 can use.
i recommend using 1 @ time. in fact, author of non-jqueryui 1 recommends use jqueryui version, version has been deprecated in favor one:
note (2010-06-23): plugin deprecated , not developed anymore. successor part of jquery ui, , migration guide explains how plugin new one.
there few nice features in original not included in jqueryui one, think can accomplish of features (and ways have been asked questions , answered here on stackoverflow).
Comments
Post a Comment