mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-30 23:36:47 +02:00
added support for jquery 1.8.*
This commit is contained in:
14
js/tests/unit/bootstrap-tooltip.js
vendored
14
js/tests/unit/bootstrap-tooltip.js
vendored
@@ -113,7 +113,7 @@ $(function () {
|
||||
}, 50)
|
||||
})
|
||||
|
||||
test("should show tooltip if leave event hasn't occurred before delay expires", function () {
|
||||
test("should show tooltip if leave event hasn't occured before delay expires", function () {
|
||||
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.tooltip({ delay: 150 })
|
||||
@@ -131,14 +131,14 @@ $(function () {
|
||||
test("should destroy tooltip", function () {
|
||||
var tooltip = $('<div/>').tooltip().on('click.foo', function(){})
|
||||
ok(tooltip.data('tooltip'), 'tooltip has data')
|
||||
ok(tooltip.data('events').mouseover && tooltip.data('events').mouseout, 'tooltip has hover event')
|
||||
ok(tooltip.data('events').click[0].namespace == 'foo', 'tooltip has extra click.foo event')
|
||||
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(!tooltip.data('tooltip'), 'tooltip does not have data')
|
||||
ok(tooltip.data('events').click[0].namespace == 'foo', 'tooltip still has click.foo')
|
||||
ok(!tooltip.data('events').mouseover && !tooltip.data('events').mouseout, 'tooltip does not have any events')
|
||||
ok(!$._data(tooltip[0], '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')
|
||||
})
|
||||
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user