diff --git a/Gruntfile.js b/Gruntfile.js index c60e600ab895695f03b964ce7a1a1c206078aa7b..9c8cc854bc42e0ab489689cd8047175d0aacb42a 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,6 +1,6 @@ /* jshint node: true */ -module.exports = function(grunt) { +module.exports = function (grunt) { "use strict"; // Force use of Unix newlines diff --git a/js/dropdown.js b/js/dropdown.js index 13352ef7cf643d9df546b388c9f51e35b2f847eb..b84d219bd2e3fecf0b8b14fc1a6e3632ac2b8e8b 100644 --- a/js/dropdown.js +++ b/js/dropdown.js @@ -85,7 +85,7 @@ if (e.keyCode == 38 && index > 0) index-- // up if (e.keyCode == 40 && index < $items.length - 1) index++ // down - if (!~index) index=0 + if (!~index) index = 0 $items.eq(index).focus() } diff --git a/js/modal.js b/js/modal.js index 3ead5ee88b7f44673227f438b27d5ef55a468e24..5544cf04e00cf08bdddea528383017344d8e244a 100644 --- a/js/modal.js +++ b/js/modal.js @@ -180,7 +180,7 @@ } 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) : diff --git a/js/tests/unit/scrollspy.js b/js/tests/unit/scrollspy.js index 06219a1c8d3ba432d0b258d8e56b6a868356cff9..1b546a57991b5573a894fa95ccbf64ac0756165f 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 = '<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>' diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 2139dc8117dcb8bc313f3c87015b49364891cac9..cc559ccb61f778a400c7f7874714a1ebe1249ed4 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 = $('<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') @@ -301,7 +301,7 @@ $(function () { 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") @@ -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') }) diff --git a/js/tooltip.js b/js/tooltip.js index 8debad96be8fbaf223d0855debd09ed6a9079eba..d3bf41fb23ca99a4d5f30c9efcab5bbf92eddef2 100644 --- a/js/tooltip.js +++ b/js/tooltip.js @@ -133,7 +133,7 @@ } 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)