diff --git a/Gruntfile.js b/Gruntfile.js index c60e600ab8..9c8cc854bc 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 13352ef7cf..b84d219bd2 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 3ead5ee88b..5544cf04e0 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 06219a1c8d..1b546a5799 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 2139dc8117..cc559ccb61 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') }) diff --git a/js/tooltip.js b/js/tooltip.js index 8debad96be..d3bf41fb23 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)