mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
select2: fixed test
This commit is contained in:
@@ -144,12 +144,13 @@ $("#e11_2").select2({
|
||||
data: [{ id: 0, text: 'story' }, { id: 1, text: 'bug' }, { id: 2, text: 'task' }]
|
||||
});
|
||||
function log(e) {
|
||||
var e = $("<li>" + e + "</li>");
|
||||
$("#events_11").append(e);
|
||||
e.animate({ opacity: 1 }, 10000, 'linear', function () { e.animate({ opacity: 0 }, 2000, 'linear', function () { e.remove(); }); });
|
||||
var item = $("<li>" + e + "</li>");
|
||||
$("#events_11").append(item);
|
||||
item.animate({ opacity: 1 }, 10000, 'linear', function () { item.animate({ opacity: 0 }, 2000, 'linear', function () { item.remove(); }); });
|
||||
}
|
||||
$("#e11")
|
||||
.on("change", function (e) { log(JSON.stringify({ val: e.val, added: e.added, removed: e.removed })); })
|
||||
// TS 0.9.5: correct overload not resolved https://typescript.codeplex.com/discussions/472172
|
||||
.on("change", function (e: Select2JQueryEventObject) { log(JSON.stringify({ val: e.val, added: e.added, removed: e.removed })); })
|
||||
.on("open", function () { log("open"); });
|
||||
$("#e11_2")
|
||||
.on("change", function (e) { log(JSON.stringify({ val: e.val, added: e.added, removed: e.removed })); })
|
||||
|
||||
Reference in New Issue
Block a user