mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-04-29 19:16:50 +00:00
New Bootstrap v2.2.0
This commit is contained in:
@@ -37,10 +37,11 @@ $(function () {
|
||||
tooltip.tooltip('hide')
|
||||
})
|
||||
|
||||
test("should always allow html entities", function () {
|
||||
test("should allow html entities", function () {
|
||||
$.support.transition = false
|
||||
var tooltip = $('<a href="#" rel="tooltip" title="<b>@fat</b>"></a>')
|
||||
.appendTo('#qunit-fixture')
|
||||
.tooltip({html: true})
|
||||
.tooltip('show')
|
||||
|
||||
ok($('.tooltip b').length, 'b tag was inserted')
|
||||
@@ -113,7 +114,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 +132,22 @@ $(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')
|
||||
})
|
||||
|
||||
})
|
||||
test("should show tooltip with delegate selector on click", function () {
|
||||
var div = $('<div><a href="#" rel="tooltip" title="Another tooltip"></a></div>')
|
||||
var tooltip = div.appendTo('#qunit-fixture')
|
||||
.tooltip({ selector: 'a[rel=tooltip]',
|
||||
trigger: 'click' })
|
||||
div.find('a').trigger('click')
|
||||
ok($(".tooltip").is('.fade.in'), 'tooltip is faded in')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user