Commit a7a9a143 authored by fat's avatar fat
Browse files

fix @muan's unit test ;)

parent 102df4ff
3 merge requests!8635ignore Gruntfile.js in jekyll,!8656Added rel="stylesheet" to CDN-Examples,!8527Inner properties move 1
Showing with 6 additions and 6 deletions
+6 -6
......@@ -294,15 +294,15 @@ $(function () {
test("should add position class before positioning so that position-specific styles are taken into account", function(){
$("head").append('<style> .tooltip.right { white-space: nowrap; } .tooltip.right .tooltip-inner { max-width: none; } </style>')
var container = $("<div />").appendTo("body")
, target = $('<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line">To my right</a>')
.appendTo(container)
.tooltip({placement: 'right'})
.tooltip('show')
.appendTo(container)
.tooltip({placement: 'right'})
.tooltip('show')
, tooltip = container.find(".tooltip")
ok( Math.round(target.offset().top + target[0].offsetHeight/2 - tooltip[0].offsetHeight/2) === tooltip.offset().top )
ok( Math.round(target.offset().top + target[0].offsetHeight/2 - tooltip[0].offsetHeight/2) === Math.round(tooltip.offset().top) )
target.tooltip('hide')
})
})
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment