jquery.ajax-combobox
Version:
jQuery plugin to create a text box which can auto-complete and pull-down-select.
54 lines • 1.26 kB
HTML
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Text area: Options: 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: [
{
pattern: ['[', ']'],
space: [false, false],
db_table: 'tag',
sub_info: true
},
{
pattern: ['#', ''],
db_table: 'tag',
sub_info: true,
sub_as: {
id: 'TagID',
japanese: '日本語'
}
},
{
pattern: ['@', ''],
db_table: 'tag',
order_by: 'name DESC'
}
]
}
);
});
</script>
</head>
<body>
<h1>Text area: Options: 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>