有不止一个jQuery的自动完成插件吗? [英] Is there more than one jQuery Autocomplete widget?

查看:141
本文介绍了有不止一个jQuery的自动完成插件吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想有只有一个 - 包含在jQuery UI的和这里记录

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

我知道有一些插件来jQuery的,如一个第三方的自动完成部件从devbridge 。但我会形容,作为的自动完成插件的jQuery 的,而不是的 jQuery的自动完成构件的。

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.

不过,#2,我看问题问不使用 jQuery UI的描述的语法自动完成部件文档。例如:

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:

  • jquery.autocomplete.js - how does autocomplete work?
  • Jquery AutoComplete Plugin calling
  • Help with jquery autocomplete and json response

在jQuery UI的语法如下:

The jQuery UI syntax looks like this:

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

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

而其中的一些其他问题HAE语法如下:

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 
  });  

什么是对差异的解释呢?人们问jQuery的自动完成,而不指定的哪一个的。由于没有方向,我不应该承担jQuery用户界面自动完成?

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?

推荐答案

答案


  1. 有与jQuery的工作自动完成大量的小部件。

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


  • 只有一个属于jQuery UI的。 http://docs.jquery.com/UI/Autocomplete

  • 有是在jQuery的网站上列出的其他第三方用户贡献的插件。这不是的的jQuery的的一部分,但作品的的jQuery的。这是用户贡献的。结果
    从jquery.com:<一href=\"http://docs.jquery.com/Plugins/Autocomplete\">http://docs.jquery.com/Plugins/Autocomplete

    实际的主页:<一href=\"http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/\">http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/

  • 有无数的人....

  • There is ONLY ONE that belongs to jQuery UI. http://docs.jquery.com/UI/Autocomplete
  • There is another 3rd party user-contributed plugin that is listed on the jQuery site. This is not part of jQuery but works with jQuery. It's user-contributed.
    from jquery.com: http://docs.jquery.com/Plugins/Autocomplete
    actual home page: http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/
  • there are numerous others....

有一个习惯,那就是jQuery插件的用户中相当普遍,要求在做题的时候,要不能确定他们正在使用哪些特定的部件。人们用这样的短语 jQuery的自动完成构件,当他们真正指的是 jQuery的自动完成构件。

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".

这篇关于有不止一个jQuery的自动完成插件吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆