mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
27 lines
513 B
TypeScript
27 lines
513 B
TypeScript
|
|
|
|
// Options
|
|
$(".my_select_box").chosen();
|
|
|
|
$(".my_select_box").chosen({});
|
|
|
|
$(".my_select_box").chosen({
|
|
disable_search_threshold: 10,
|
|
max_selected_options: 5,
|
|
no_results_text: "Oops, nothing found!",
|
|
width: "95%"
|
|
});
|
|
|
|
// Destroy
|
|
$(".my_select_box").chosen("destroy");
|
|
|
|
// Triggered Events
|
|
$(".my_select_box").on("change", function(evt, params) {
|
|
evt.preventDefault();
|
|
let s = params.selected;
|
|
console.log(s);
|
|
});
|
|
|
|
// Triggerable Events
|
|
$(".my_select_box").trigger("chosen:updated");
|