From 351f86e1db6bbb5f37e67323094fc08f4aeceecd Mon Sep 17 00:00:00 2001 From: Chris Rebert Date: Fri, 6 Dec 2013 16:51:59 -0800 Subject: fix some JS to pass jscs --- js/tests/unit/scrollspy.js | 2 +- js/tests/unit/tooltip.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'js/tests') diff --git a/js/tests/unit/scrollspy.js b/js/tests/unit/scrollspy.js index 06219a1c8..1b546a579 100644 --- a/js/tests/unit/scrollspy.js +++ b/js/tests/unit/scrollspy.js @@ -19,7 +19,7 @@ $(function () { test("should switch active class on scroll", function () { var sectionHTML = '
' , $section = $(sectionHTML).append('#qunit-fixture') - , topbarHTML ='
' + , topbarHTML = '
' + '
' + '
' + '

Bootstrap

' diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 2139dc811..cc559ccb6 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -290,7 +290,7 @@ $(function () { test("should place tooltips inside the body", function () { var tooltip = $('') .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') @@ -301,7 +301,7 @@ $(function () { var container = $("
").appendTo("body") .css({position: "absolute", width: 200, height: 200, bottom: 0, left: 0}) , tooltip = $("Hover me") - .css({position: "absolute", top:0, left: 0}) + .css({position: "absolute", top: 0, left: 0}) .appendTo(container) .tooltip({placement: "top", animate: false}) .tooltip("show") @@ -347,7 +347,7 @@ $(function () { .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') }) -- cgit v1.2.3