diff --git a/Gruntfile.js b/Gruntfile.js
index 3eaaacee935b..f7da24f8b802 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,7 +1,7 @@
/* jshint node: true */
module.exports = function (grunt) {
- "use strict";
+ 'use strict';
// Force use of Unix newlines
grunt.util.linefeed = '\n';
@@ -135,7 +135,7 @@ module.exports = function (grunt) {
copy: {
fonts: {
expand: true,
- src: ["fonts/*"],
+ src: ['fonts/*'],
dest: 'dist/'
}
},
@@ -164,12 +164,12 @@ module.exports = function (grunt) {
options: {
reset: true,
relaxerror: [
- "Bad value X-UA-Compatible for attribute http-equiv on element meta.",
- "Element img is missing required attribute src."
+ 'Bad value X-UA-Compatible for attribute http-equiv on element meta.',
+ 'Element img is missing required attribute src.'
]
},
files: {
- src: ["_gh_pages/**/*.html"]
+ src: ['_gh_pages/**/*.html']
}
},
diff --git a/dist/js/bootstrap.js b/dist/js/bootstrap.js
index d6b01e8508e1..dfa3d4e24602 100644
--- a/dist/js/bootstrap.js
+++ b/dist/js/bootstrap.js
@@ -26,7 +26,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
@@ -83,7 +83,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// ALERT CLASS DEFINITION
// ======================
@@ -182,7 +182,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
@@ -298,7 +298,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// CAROUSEL CLASS DEFINITION
// =========================
@@ -516,7 +516,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
@@ -696,7 +696,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
@@ -851,7 +851,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// MODAL CLASS DEFINITION
// ======================
@@ -1099,7 +1099,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// TOOLTIP PUBLIC CLASS DEFINITION
// ===============================
@@ -1324,7 +1324,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
}
Tooltip.prototype.replaceArrow = function (delta, dimension, position) {
- this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '')
+ this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + '%') : '')
}
Tooltip.prototype.setContent = function () {
@@ -1485,7 +1485,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
@@ -1603,7 +1603,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
@@ -1762,7 +1762,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// TAB CLASS DEFINITION
// ====================
@@ -1898,7 +1898,7 @@ if (typeof jQuery === "undefined") { throw new Error("Bootstrap requires jQuery"
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// AFFIX CLASS DEFINITION
// ======================
diff --git a/docs-assets/js/application.js b/docs-assets/js/application.js
index 1d95de879fee..ace8bddfcb77 100644
--- a/docs-assets/js/application.js
+++ b/docs-assets/js/application.js
@@ -18,13 +18,13 @@
//
// See Getting Started docs for more information
if (navigator.userAgent.match(/IEMobile\/10\.0/)) {
- var msViewportStyle = document.createElement("style");
+ var msViewportStyle = document.createElement('style');
msViewportStyle.appendChild(
document.createTextNode(
- "@-ms-viewport{width:auto!important}"
+ '@-ms-viewport{width:auto!important}'
)
);
- document.getElementsByTagName("head")[0].
+ document.getElementsByTagName('head')[0].
appendChild(msViewportStyle);
}
@@ -73,20 +73,20 @@
// tooltip demo
$('.tooltip-demo').tooltip({
- selector: "[data-toggle=tooltip]",
- container: "body"
+ selector: '[data-toggle=tooltip]',
+ container: 'body'
})
$('.tooltip-test').tooltip()
$('.popover-test').popover()
$('.bs-docs-navbar').tooltip({
- selector: "a[data-toggle=tooltip]",
- container: ".bs-docs-navbar .nav"
+ selector: 'a[data-toggle=tooltip]',
+ container: '.bs-docs-navbar .nav'
})
// popover demo
- $("[data-toggle=popover]")
+ $('[data-toggle=popover]')
.popover()
// button state demo
diff --git a/docs-assets/js/customizer.js b/docs-assets/js/customizer.js
index 4d39d2170766..d560769c3ff0 100644
--- a/docs-assets/js/customizer.js
+++ b/docs-assets/js/customizer.js
@@ -35,18 +35,18 @@ window.onload = function () { // wait for load in a dumb way because B-0
}
function getQueryParam(key) {
- key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
- var match = location.search.match(new RegExp("[?&]" + key + "=([^&]+)(&|$)"));
- return match && decodeURIComponent(match[1].replace(/\+/g, " "));
+ key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, '\\$&'); // escape RegEx meta chars
+ var match = location.search.match(new RegExp('[?&]' + key + '=([^&]+)(&|$)'));
+ return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
}
function createGist(configJson) {
var data = {
- "description": "Bootstrap Customizer Config",
- "public": true,
- "files": {
- "config.json": {
- "content": configJson
+ 'description': 'Bootstrap Customizer Config',
+ 'public': true,
+ 'files': {
+ 'config.json': {
+ 'content': configJson
}
}
}
@@ -57,7 +57,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
data: JSON.stringify(data)
})
.success(function (result) {
- var origin = window.location.protocol + "//" + window.location.host
+ var origin = window.location.protocol + '//' + window.location.host
history.replaceState(false, document.title, origin + window.location.pathname + '?id=' + result.id)
})
.error(function (err) {
@@ -144,10 +144,10 @@ window.onload = function () { // wait for load in a dumb way because B-0
}
if (config) {
- zip.file("config.json", config)
+ zip.file('config.json', config)
}
- var content = zip.generate({ type: "blob" })
+ var content = zip.generate({ type: 'blob' })
complete(content)
}
@@ -311,22 +311,22 @@ window.onload = function () { // wait for load in a dumb way because B-0
generateZip(generateCSS(), generateJavascript(), generateFonts(), configJson, function (blob) {
$compileBtn.removeAttr('disabled')
- saveAs(blob, "bootstrap.zip")
+ saveAs(blob, 'bootstrap.zip')
createGist(configJson)
})
})
// browser support alerts
if (!window.URL && navigator.userAgent.toLowerCase().indexOf('safari') != -1) {
- showCallout("Looks like you're using safari, which sadly doesn't have the best support\
- for HTML5 blobs. Because of this your file will be downloaded with the name \"untitled\"
.\
- However, if you check your downloads folder, just rename this \"untitled\"
file\
- to \"bootstrap.zip\"
and you should be good to go!")
+ showCallout('Looks like you\'re using safari, which sadly doesn\'t have the best support\
+ for HTML5 blobs. Because of this your file will be downloaded with the name "untitled"
.\
+ However, if you check your downloads folder, just rename this "untitled"
file\
+ to "bootstrap.zip"
and you should be good to go!')
} else if (!window.URL && !window.webkitURL) {
$('.bs-docs-section, .bs-sidebar').css('display', 'none')
- showCallout("Looks like your current browser doesn't support the Bootstrap Customizer. Please take a second\
- to upgrade to a more modern browser.", true)
+ showCallout('Looks like your current browser doesn\'t support the Bootstrap Customizer. Please take a second\
+ to upgrade to a more modern browser.', true)
}
parseUrl()
diff --git a/js/.jshintrc b/js/.jshintrc
index fdfdfbbfb3df..c8cccda377bb 100644
--- a/js/.jshintrc
+++ b/js/.jshintrc
@@ -10,5 +10,6 @@
"expr" : true,
"laxbreak" : true,
"laxcomma" : true,
+ "quotmark" : "single",
"validthis": true
}
\ No newline at end of file
diff --git a/js/affix.js b/js/affix.js
index 552bffa3fed8..0650ce3ae5f2 100644
--- a/js/affix.js
+++ b/js/affix.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// AFFIX CLASS DEFINITION
// ======================
diff --git a/js/alert.js b/js/alert.js
index 695ad74d02bd..13a0cab915aa 100644
--- a/js/alert.js
+++ b/js/alert.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// ALERT CLASS DEFINITION
// ======================
diff --git a/js/button.js b/js/button.js
index c9fdde5e488a..6c66960d8201 100644
--- a/js/button.js
+++ b/js/button.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// BUTTON PUBLIC CLASS DEFINITION
// ==============================
diff --git a/js/carousel.js b/js/carousel.js
index 6391a36df90d..26f3832ff463 100644
--- a/js/carousel.js
+++ b/js/carousel.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// CAROUSEL CLASS DEFINITION
// =========================
diff --git a/js/collapse.js b/js/collapse.js
index 1a079938e70b..7bc9fcb42537 100644
--- a/js/collapse.js
+++ b/js/collapse.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// COLLAPSE PUBLIC CLASS DEFINITION
// ================================
diff --git a/js/dropdown.js b/js/dropdown.js
index b84d219bd2e3..3f71c7569bff 100644
--- a/js/dropdown.js
+++ b/js/dropdown.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// DROPDOWN CLASS DEFINITION
// =========================
diff --git a/js/modal.js b/js/modal.js
index 5544cf04e00c..15b81c362373 100644
--- a/js/modal.js
+++ b/js/modal.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// MODAL CLASS DEFINITION
// ======================
diff --git a/js/popover.js b/js/popover.js
index 996962aa250f..d26d386b67f4 100644
--- a/js/popover.js
+++ b/js/popover.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
diff --git a/js/scrollspy.js b/js/scrollspy.js
index 2efe14fddf64..8c4d13490cad 100644
--- a/js/scrollspy.js
+++ b/js/scrollspy.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// SCROLLSPY CLASS DEFINITION
// ==========================
diff --git a/js/tab.js b/js/tab.js
index 6b0f5f67229c..c584ebf9827f 100644
--- a/js/tab.js
+++ b/js/tab.js
@@ -18,7 +18,7 @@
* ======================================================================== */
-+function ($) { "use strict";
++function ($) { 'use strict';
// TAB CLASS DEFINITION
// ====================
diff --git a/js/tests/unit/affix.js b/js/tests/unit/affix.js
index b74bc51e48bd..6085a141e250 100644
--- a/js/tests/unit/affix.js
+++ b/js/tests/unit/affix.js
@@ -1,22 +1,22 @@
$(function () {
- module("affix")
+ module('affix')
- test("should provide no conflict", function () {
+ test('should provide no conflict', function () {
var affix = $.fn.affix.noConflict()
ok(!$.fn.affix, 'affix was set back to undefined (org value)')
$.fn.affix = affix
})
- test("should be defined on jquery object", function () {
+ test('should be defined on jquery object', function () {
ok($(document.body).affix, 'affix method is defined')
})
- test("should return element", function () {
+ test('should return element', function () {
ok($(document.body).affix()[0] == document.body, 'document.body returned')
})
- test("should exit early if element is not visible", function () {
+ test('should exit early if element is not visible', function () {
var $affix = $('