autocomplete jquery code example
Example 1: ajax autocomplete javascript
rake webpack
Example 2: jquery autocomplete database
<?php
require "database/database.php";
$data = mysql_query("SELECT * FROM countries");
$result = array();
while($row = mysql_fetch_assoc($data)) {
$result[] = array(
'label' = $row['countryname'],
'value' = $row['countryname']
);
}
echo json_encode($result);
flush();
}
?>
Example 3: jquery autocomplete select
$( ".selector" ).autocomplete({
appendTo: "#someElem"
});