mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-23 04:47:24 +08:00
26 lines
666 B
TypeScript
26 lines
666 B
TypeScript
/// <reference path="../jquery/jquery.d.ts"/>
|
|
/// <reference path="magicsuggest.d.ts"/>
|
|
|
|
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()
|
|
} |