Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Autocomplete Search With Semantic UI
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<title>Autocomplete Search With Semantic UI</title>
<link rel="stylesheet" href="semantic/dist/semantic.css">
<center style="padding: 30px 0;width: 227px;margin: 0 auto;">
<h1>Search for colors</h1>
<div class="ui search focus">
<div class="ui icon input">
<input class="search" type="text" placeholder="Colors..." autocomplete="off">
<i class="search icon"></i>
<div class="results"></div>
<script src=""></script>
<script src="semantic/dist/semantic.js"></script>
// Define API endpoints once globally
$.fn.api.settings.api = {
'search' : '/search/colors/?query={value}'
$('.search input')
debug: true,
action: 'search',
url: 'http://localhost/semantic-ui/labs/colors/colors.php?query={value}',
searchFullText: false,
stateContext: '.ui.input'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.