Nová ukázka
Reset
Načíst z URL
Uložit a získat odkaz
Vztahuje se k…
Nevyplňujte
Napiště „nejsem robot“
▶
Přepnout zobrazení
Výsledek
<script src="http://leaverou.github.io/awesomplete/awesomplete.js"></script> <link href="http://leaverou.github.io/awesomplete/awesomplete.css" rel="stylesheet"> Věci: <input id="things" class="awesomplete"> <br> Zvířata: <input id="animals" class="awesomplete">
HTML
Autoformát
Standardní režim
Mobilní zobrazení
CSS
Autoformát
CSS reset
Až na konci
// společne nastavení var multiple = { filter: function(text, input) { return Awesomplete.FILTER_CONTAINS(text, input.match(/[^,]*$/)[0]); }, replace: function(text) { var before = this.input.value.match(/^.+,\s*|/)[0]; this.input.value = before + text + ", "; }, minChars: 1 // toto asi ve výsledku chtít nebudeš }; var things = ['písek','pero','plomba']; var thingsInput = document.getElementById("things"); var thingsComplete = new Awesomplete(thingsInput, multiple); thingsComplete.list = things; var animals = ['pásovec','pes','pštros']; var animalsInput = document.getElementById("animals"); var animalsComplete = new Awesomplete(animalsInput, multiple); animalsComplete.list = animals;
J
ava
S
cript
Autoformát
jQuery
Umístění JS
window.onload
</head>
</body>