mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-24 05:06:02 +08:00
25 lines
610 B
TypeScript
25 lines
610 B
TypeScript
/// <reference types="jquery"/>
|
|
|
|
function basicTest() {
|
|
$('#magicSuggest').magicSuggest();
|
|
}
|
|
|
|
function testWithConfigurationOptions() {
|
|
$('#magicSuggest').magicSuggest({
|
|
data: [
|
|
{ id: 1, name: "Buenos Aires" },
|
|
{ id: 2, name: "New York" },
|
|
{ id: 3, name: "Madrid" },
|
|
],
|
|
maxDropHeight: 500,
|
|
maxSelection: 2,
|
|
expandOnFocus: true,
|
|
});
|
|
}
|
|
|
|
function testSomeMethods() {
|
|
var ms = $('#magicSuggest').magicSuggest();
|
|
ms.addToSelection([{ id: 1, name: "Mexico" }]);
|
|
console.info(ms.getSelection());
|
|
ms.disable()
|
|
} |