From 5ef634dab9bb39b9dc5beb10a568a05952a519ff Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Thu, 3 Apr 2014 18:13:16 -0700 Subject: replace $.bind() with $.on() in unit tests; per #13272 --- js/tests/unit/modal.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/tests/unit/modal.js') diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index b026d18c4..34912c2e9 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -140,13 +140,13 @@ $(function () { $.support.transition = false var div = $('') div - .bind('shown.bs.modal', function () { + .on('shown.bs.modal', function () { ok($('#modal-test').length, 'modal insterted into dom') $('.contents').click() ok($('#modal-test').is(':visible'), 'modal visible') $('#modal-test').click() }) - .bind('hidden.bs.modal', function () { + .on('hidden.bs.modal', function () { ok(!$('#modal-test').is(':visible'), 'modal hidden') div.remove() start() @@ -162,11 +162,11 @@ $(function () { var div = $('') div - .bind('shown.bs.modal', function () { + .on('shown.bs.modal', function () { triggered = 0 $('#modal-test').click() }) - .bind('hide.bs.modal', function () { + .on('hide.bs.modal', function () { triggered += 1 ok(triggered === 1, 'modal hide triggered once') start() @@ -179,7 +179,7 @@ $(function () { $.support.transition = false var div = $('') div - .bind('shown.bs.modal', function () { + .on('shown.bs.modal', function () { $('#close').click() ok(!$('#modal-test').is(':visible'), 'modal hidden') }) -- cgit v1.2.3