8

I thought there was only one - included in jQuery UI and documented here.

I know there are third-party autocomplete widgets that plug-in to jQuery, like the one from devbridge. But I would describe that as an autocomplete widget for jQuery, rather than the jQuery autocomplete widget.

But on Stackoverflow, I see questions asking about an autocomplete widget that does not use the syntax described in the jQuery UI documentation. For example:

The jQuery UI syntax looks like this:

      $("#input1").autocomplete({
          source: function(req, responseFn) {
                ...
          },

          select: function(value, data){
                 ...
          }
      });

Whereas some of those other questions hae a syntax like this:

  $("#city").autocomplete("CUList.asmx/GetCUList", { 
      dataType: 'jsonp', 
      parse: function(data)  
      { 
          var rows = new Array(); 
          for(var i=0; i<data.length; i++){ 
              rows[i] = { data:data[i], value:data[i].CUName, result:data[i].CUName }; 
          } 
          return rows; 
      }, 
      formatItem: function(row, i, n) { 
          return row.CUName + ', ' + row.CUCity; 
      }, 
      max: 50 
  });  

What's the explanation for the discrepancy? People ask about "jquery autocomplete" without specifying which one. With no direction, shouldn't I assume THE jquery UI autocomplete?

Community
  • 1
  • 1
Cheeso
  • 189,189
  • 101
  • 473
  • 713

3 Answers3

8

ANSWER

  1. There are numerous autocomplete widgets that work with jQuery.

  2. There is a habit that is fairly common among users of jquery plugins, when asking questions on SO, to not identify which particular widget they are using. People use phrases like "the jquery autocomplete widget" when they really are referring to "a jquery autocomplete widget".

Cheeso
  • 189,189
  • 101
  • 473
  • 713
2

A Google search reveals many different jQuery autocomplete plugins, including four named jQuery autocomplete.

SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
  • 1
    I know there are many autocomplete options; that's why I wrote `I know there are third-party autocomplete widgets`. My point is, which widget are people asking about, when they say 'jquery autocomplete' when it is obviously NOT the jQuery UI autocomplete? Is there some "other" dominant autocomplete which is used everywhere but yet is not the official one? – Cheeso Mar 11 '10 at 01:45
  • Yes, there are four them them. – SLaks Mar 11 '10 at 01:51
2

There are many. I even know of one that has hijacked the jquery-autocomplete tag on StackOverflow. Direct from the support page:

If you want to use jquery-autocomplete, you may have some questions. We suggest you ask your questions on StackOverflow, and use the jquery-autocomplete tag to identify them.

Peter Di Cecco
  • 1,548
  • 5
  • 15
  • 26
  • 3
    Hi, I'm the author of http://code.google.com/p/jquery-autocomplete, which was the first ever jQuery autocompleter. Hijacking sounds a bit negative. I think questions on "How to ..." are best suited to Stack Overflow because users get good responses here, and can compare other autocompleters (some of which are based on mine). See also the [History](http://code.google.com/p/jquery-autocomplete/wiki/History). – dyve Dec 15 '10 at 15:43
  • 1
    Sorry to sound negative, but hijacking is exactly what you did. There are a number of autocomplete plugins for jquery. Claiming the jquery-autocomplete tag for your own is hijacking. Not to say your tool isn't good though. I used it myself before the jQuery UI version existed. – Peter Di Cecco Dec 15 '10 at 19:01