} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
- $.support.transition && this.$element.hasClass('fade')?
+ $.support.transition && this.$element.hasClass('fade') ?
this.$backdrop
.one($.support.transition.end, callback)
.emulateTransitionEnd(150) :
test("should switch active class on scroll", function () {
var sectionHTML = '<div id="masthead"></div>'
, $section = $(sectionHTML).append('#qunit-fixture')
- , topbarHTML ='<div class="topbar">'
+ , topbarHTML = '<div class="topbar">'
+ '<div class="topbar-inner">'
+ '<div class="container">'
+ '<h3><a href="#">Bootstrap</a></h3>'
test("should place tooltips inside the body", function () {
var tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"></a>')
.appendTo('#qunit-fixture')
- .tooltip({container:'body'})
+ .tooltip({container: 'body'})
.tooltip('show')
ok($("body > .tooltip").length, 'inside the body')
ok(!$("#qunit-fixture > .tooltip").length, 'not found in parent')
var container = $("<div />").appendTo("body")
.css({position: "absolute", width: 200, height: 200, bottom: 0, left: 0})
, tooltip = $("<a href='#' title='Very very very very very very very very long tooltip'>Hover me</a>")
- .css({position: "absolute", top:0, left: 0})
+ .css({position: "absolute", top: 0, left: 0})
.appendTo(container)
.tooltip({placement: "top", animate: false})
.tooltip("show")
.tooltip('show')
, tooltip = container.find(".tooltip")
- ok( Math.round(target.offset().top + target[0].offsetHeight/2 - tooltip[0].offsetHeight/2) === Math.round(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')
})
}
Tooltip.prototype.show = function () {
- var e = $.Event('show.bs.'+ this.type)
+ var e = $.Event('show.bs.' + this.type)
if (this.hasContent() && this.enabled) {
this.$element.trigger(e)