<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Autosuggest Demo</title>
	<link rel="icon" href="data:,">
	<script type="text/javascript" src="../../../../../../lib/js/jquery/jquery.js"></script>
	<script type="text/javascript" src="../../../../../../lib/js/framework/src/core_utils.js"></script>
	<link rel="stylesheet" type="text/css" href="../smart-suggest.css">
	<script type="text/javascript" src="../smart-suggest.js"></script>
</head>
<body>
<center>
	<h1>Autosuggest demo</h1>
	<div>
		<input id="mySuggest1" type="text" placeholder="Type a text for autosuggest" style="width:350px;">
		<script>
			SmartAutoSuggest.bindToInput('single', 'mySuggest1', 'This is a single "autosuggest" field', 'sample-answer.json?src=', true, 475, 0, (id, value, label, data) => { jQuery('#show-selection').text('SINGLE' + '\n' + 'Selected Value is: ' + value + '\n' + 'Selected ID is: ' + id + '\n' + 'Selected Label is: ' + label + '\n' + 'Selected Data is: ' + data); });
		</script>
	</div>
	<br>
	<div>
		<input id="mySuggest2" type="text" placeholder="Type a text for autosuggest" style="width:350px;">
		<script>
			SmartAutoSuggest.bindToInput('multilist', 'mySuggest2', 'This is a multi "autosuggest" field', 'sample-answer.json?src=', false, 475, 0,  'jQuery(\'#show-selection\').text(\'MULTI\' + \'\\n\' + \'Selected Value is: \' + value + \'\\n\' + \'Selected ID is: \' + id + \'\\n\' + \' ... and the rest of parameters exactly as SINGLE ...\');');
		</script>
	</div>
	<br>
	<br>
	<h2>Selected Data</h2>
	<pre id="show-selection" style="width:750px; background:#ECECEC; padding:10px; text-align:left;"></pre>
</center>
</body>
</html>