Coder Social home page Coder Social logo

autocomplete's Introduction

Autocomplete

##功能

  • 支持本地或远程,并对匹配结果进行二次开发
  • 支持热门推荐,及没有任何输入时暂时默认推荐内容
  • 支持多个项的输入,自行指定分隔符
  • 盲人用户的支持,热门推荐模块支持键盘上下左右操作
  • 更多演示请看DEMO和查阅API

##快速使用

S.use('gallery/autocomplete/1.1/index', function (S, Autocomplete) {
var autocomplete = new Autocomplete({
    inputNode        : '#J_NeCity',
    source           : 'http://s.jipiao.trip.taobao.com/city_search.do?lines={maxResults}&q={query}',
    resultListLocator: 'result',//指定返回数据里的数组位置
    resultTextLocator: 'cityName',//指定回填的文本内容
  hotSource : 'http://www.taobao.com/go/rgn/trip/chinahotcity_jsonp.php'//不指定及没有热门推荐,必须按照此数据模板提供,其他数据格式需要自行重新配置hotResultsFormatter和hotResultsLocator
});
})

autocomplete's People

Contributors

dickeylth avatar

Watchers

James Cloos avatar Glen Arrospide avatar

autocomplete's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.