jquery ui autocomplete
今天用了点jqueryui的autocomplete插件,过程中可谓是遇到了许多问题,坎坎坷坷总算是成功了;具体的实现方法参见"http://jqueryui.com/"。这里面写的很详细,我只说两点注意事项:
1.注意jqueryui的版本,新的1.8+的实现方法和以前不同;
2.我们多数需要自己组装数据源,可以是本地数据源为本地js数组或本地的json对象;
3.形如var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ];的数组可以直接用插件会自动在其中搜索;如果是形如
var projects = [ { value: "jquery", label: "jQuery", desc: "the write less, do more, JavaScript library", icon: "jquery_32x32.png" }, { value: "jquery-ui", label: "jQuery UI", desc: "the official user interface library for jQuery", icon: "jqueryui_32x32.png" }, { value: "sizzlejs", label: "Sizzle JS", desc: "a pure-JavaScript CSS selector engine", icon: "sizzlejs_32x32.png" } ];一定要label或者value,插件会根据这两个值搜索
相关推荐
gufudhn 2020-06-12
yaohustiAC 2019-12-27
pythonclass 2019-11-07
geminihr 2015-03-19
仲崇峰 2015-06-02
83453065 2015-07-22
hubowei 2015-07-22
原為簡單 2017-02-21
87433764 2017-02-21
小肖 2017-05-12
89453862 2017-09-16
delmarks 2017-02-21
yesbuy00 2017-02-08
85403969 2016-10-25
gamecalo 2016-10-08
Web全栈笔记 2016-10-08
Kindlecode 2016-05-25