jquery.ajax-combobox
Version:
jQuery plugin to create a text box which can auto-complete and pull-down-select.
48 lines (47 loc) • 1.13 kB
HTML
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Text area: Multi tag pattern: jquery.ajax-combobox</title>
<link rel="stylesheet" href="../../dist/css/jquery.ajax-combobox.css">
<style>
textarea {
font-size: 1.2em;
}
</style>
<script src="../../node_modules/jquery/dist/jquery.min.js"></script>
<script src="../../dist/js/jquery.ajax-combobox.min.js"></script>
<script>
$(function() {
$('#foo').ajaxComboBox(
'../../dist/php/jquery.ajax-combobox.php',
{
plugin_type: 'textarea',
tags: [
{ // 1st
pattern: ['[', ']'],
space: [false, false],
db_table: 'tag'
},
{ // 2nd
pattern: ['#', ''],
db_table: 'tag'
},
{ // 3rd
pattern: ['@', ''],
db_table: 'tag'
}
]
}
);
});
</script>
</head>
<body>
<h1>Text area: Multi tag pattern: jquery.ajax-combobox</h1>
<label for="foo">Learning:</label><br>
<textarea id="foo" rows="6" cols="40">[mathematics][his] #phi #gy
@lo @lin</textarea>
</body>
</html>