@mdrajibul/sbox
v1.0.1
Published
A jquery base autocomplete
Downloads
4
Maintainers
Readme
sbox
A jQuery base plugin for dropdown and autocomplete.
Documentation
http://www.rajibul.me/p/sbox.html
Installation
# using npm
npm install --save @mdrajibul/sbox
Usage
In your Js/TS file as jQuery:
import $ from "jquery";
$(() => {
$("#country").Sbox({
width: '120px',
typeHeader: false,
dataStore: {
json: [
{
id: 'usa',
name: 'United states'
},
{
id: 'uk',
name: 'United kingdom'
},
{
id: 'india',
name: 'India'
},
],
},
listners: {
onSelect: (el, data) => {
console.log(el, data);
},
}
});
});
In your Js/TS file without jQuery:
new Sbox({
selector: $("#sboxElement"),// it should be jquery or HTML element
width: "120px",
typeHeader: false,
dataStore: {
arrayList: [ 'United states', 'United kingdom','India']
},
listners: {
onSelect: (el, data) => {
console.log(el, data);
},
}
});
More information please visit Sbox examples