2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Merge pull request #13593 from ResentedHook/master

Add tooltip self-reference to address #12320
This commit is contained in:
Chris Rebert
2014-05-23 14:33:19 -07:00
3 changed files with 22 additions and 0 deletions
+11
View File
@@ -325,6 +325,17 @@ $(function () {
ok($('.tooltip').is('.fade.in'), 'tooltip should be toggled in')
})
test('should hide shown tooltip when toggle is called on tooltip', function () {
var tooltip = $('<a href="#" rel="tooltip" title="tooltip on toggle">@ResentedHook</a>')
.appendTo('#qunit-fixture')
.bootstrapTooltip({trigger: 'manual'})
.bootstrapTooltip('toggle')
$('.tooltip', '#qunit-fixture').bootstrapTooltip('toggle')
ok($('.tooltip').not('.fade.in'), 'tooltip should be toggled out')
tooltip.bootstrapTooltip('hide')
$('#qunit-fixture').empty()
})
test('should place tooltips inside the body', function () {
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
.appendTo('#qunit-fixture')