select2: fixed test

This commit is contained in:
Igor Oleinikov
2013-12-20 13:17:37 +04:00
parent 400f0f22b6
commit 5384a5d803
+5 -4
View File
@@ -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 })); })