diff options
author | fat <jacobthornton@gmail.com> | 2013-05-17 07:19:51 +0400 |
---|---|---|
committer | fat <jacobthornton@gmail.com> | 2013-05-17 07:19:51 +0400 |
commit | 140ef2320bbb96ad90b73a884d83198706affaf9 (patch) | |
tree | 4de562f3c4fa8d989de16ebe61fd07732109a9e5 /js/tests/unit/tooltip.js | |
parent | 5ab72f76878a85f105702a24096268fea73fba2d (diff) |
change namespace back to dot notation and someother js shizzle
Diffstat (limited to 'js/tests/unit/tooltip.js')
-rw-r--r-- | js/tests/unit/tooltip.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 8a1be0ecad..638edefc26 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -69,7 +69,7 @@ $(function () { test("should fire show event", function () { stop() var tooltip = $('<div title="tooltip title"></div>') - .bind("bs:tooltip:show", function() { + .on("show.bs.tooltip", function() { ok(true, "show was called") start() }) @@ -79,7 +79,7 @@ $(function () { test("should fire shown event", function () { stop() var tooltip = $('<div title="tooltip title"></div>') - .bind("bs:tooltip:shown", function() { + .on("shown.bs.tooltip", function() { ok(true, "shown was called") start() }) @@ -89,12 +89,12 @@ $(function () { test("should not fire shown event when default prevented", function () { stop() var tooltip = $('<div title="tooltip title"></div>') - .bind("bs:tooltip:show", function(e) { + .on("show.bs.tooltip", function(e) { e.preventDefault() ok(true, "show was called") start() }) - .bind("bs:tooltip:shown", function() { + .on("shown.bs.tooltip", function() { ok(false, "shown was called") }) .tooltip('show') @@ -103,10 +103,10 @@ $(function () { test("should fire hide event", function () { stop() var tooltip = $('<div title="tooltip title"></div>') - .bind("bs:tooltip:shown", function() { + .on("shown.bs.tooltip", function() { $(this).tooltip('hide') }) - .bind("bs:tooltip:hide", function() { + .on("hide.bs.tooltip", function() { ok(true, "hide was called") start() }) @@ -116,10 +116,10 @@ $(function () { test("should fire hidden event", function () { stop() var tooltip = $('<div title="tooltip title"></div>') - .bind("bs:tooltip:shown", function() { + .on("shown.bs.tooltip", function() { $(this).tooltip('hide') }) - .bind("bs:tooltip:hidden", function() { + .on("hidden.bs.tooltip", function() { ok(true, "hidden was called") start() }) @@ -129,15 +129,15 @@ $(function () { test("should not fire hidden event when default prevented", function () { stop() var tooltip = $('<div title="tooltip title"></div>') - .bind("bs:tooltip:shown", function() { + .on("shown.bs.tooltip", function() { $(this).tooltip('hide') }) - .bind("bs:tooltip:hide", function(e) { + .on("hide.bs.tooltip", function(e) { e.preventDefault() ok(true, "hide was called") start() }) - .bind("bs:tooltip:hidden", function() { + .on("hidden.bs.tooltip", function() { ok(false, "hidden was called") }) .tooltip('show') @@ -214,13 +214,13 @@ $(function () { test("should destroy tooltip", function () { var tooltip = $('<div/>').tooltip().on('click.foo', function(){}) - ok(tooltip.data('bs-tooltip'), 'tooltip has data') + ok(tooltip.data('bs.tooltip'), 'tooltip has data') ok($._data(tooltip[0], 'events').mouseover && $._data(tooltip[0], 'events').mouseout, 'tooltip has hover event') ok($._data(tooltip[0], 'events').click[0].namespace == 'foo', 'tooltip has extra click.foo event') tooltip.tooltip('show') tooltip.tooltip('destroy') ok(!tooltip.hasClass('in'), 'tooltip is hidden') - ok(!$._data(tooltip[0], 'bs-tooltip'), 'tooltip does not have data') + ok(!$._data(tooltip[0], 'bs.tooltip'), 'tooltip does not have data') ok($._data(tooltip[0], 'events').click[0].namespace == 'foo', 'tooltip still has click.foo') ok(!$._data(tooltip[0], 'events').mouseover && !$._data(tooltip[0], 'events').mouseout, 'tooltip does not have any events') }) |