diff --git a/docs/assets/js/_src/application.js b/docs/assets/js/_src/application.js index 678c6eace4..9ebba13fe5 100644 --- a/docs/assets/js/_src/application.js +++ b/docs/assets/js/_src/application.js @@ -31,11 +31,8 @@ var $window = $(window) var $body = $(document.body) - var navHeight = $('.navbar').outerHeight(true) + 10 - $body.scrollspy({ - target: '.bs-docs-sidebar', - // offset: navHeight + target: '.bs-docs-sidebar' }) $window.on('load', function () { diff --git a/docs/assets/js/_src/customizer.js b/docs/assets/js/_src/customizer.js index c2dcba73f4..ac314dc733 100644 --- a/docs/assets/js/_src/customizer.js +++ b/docs/assets/js/_src/customizer.js @@ -231,7 +231,9 @@ window.onload = function () { // wait for load in a dumb way because B-0 paths: ['variables.less', 'mixins.less'], optimization: 0, filename: baseFilename + '.css' - }).parse(lessSource, function (err, tree) { + }) + + parser.parse(lessSource, function (err, tree) { if (err) { return showError('Ruh roh! Could not parse less files.', err) } @@ -331,7 +333,6 @@ window.onload = function () { // wait for load in a dumb way because B-0 }) var $compileBtn = $('#btn-compile') - var $downloadBtn = $('#btn-download') $compileBtn.on('click', function (e) { var configData = getCustomizerData() diff --git a/grunt/.jshintrc b/grunt/.jshintrc index 8d402b53c2..d9dce889b1 100644 --- a/grunt/.jshintrc +++ b/grunt/.jshintrc @@ -6,5 +6,6 @@ "node" : true, "nonbsp": true, "strict": true, - "undef" : true + "undef" : true, + "unused": true } diff --git a/js/.jshintrc b/js/.jshintrc index e1ead322ea..c6104dc931 100644 --- a/js/.jshintrc +++ b/js/.jshintrc @@ -8,5 +8,6 @@ "eqnull" : true, "expr" : true, "laxbreak" : true, + "unused" : true, "validthis": true } diff --git a/js/scrollspy.js b/js/scrollspy.js index 137bd373fc..c77a9fbed7 100644 --- a/js/scrollspy.js +++ b/js/scrollspy.js @@ -43,7 +43,8 @@ this.targets = $([]) var self = this - var $targets = this.$body + + this.$body .find(this.selector) .map(function () { var $el = $(this) diff --git a/js/tests/unit/affix.js b/js/tests/unit/affix.js index b348ecf2b5..673026b8c1 100644 --- a/js/tests/unit/affix.js +++ b/js/tests/unit/affix.js @@ -28,14 +28,14 @@ $(function () { var template = $('