summaryrefslogtreecommitdiff
path: root/web-ui/app/js/style_guide
diff options
context:
space:
mode:
authorBruno Wagner <bwagner@thoughtworks.com>2014-10-07 15:01:42 +0200
committerBruno Wagner <bwagner@thoughtworks.com>2014-10-07 15:01:54 +0200
commit6299531f4c8f7daa1b4afab45d0439f635b03982 (patch)
tree92b2876e732731e5219e50ef7719c72ec2cb478a /web-ui/app/js/style_guide
parent88abefd3e62fb65a08dde62a7d7e4ce1fa22f563 (diff)
Fixed jshint errors
Diffstat (limited to 'web-ui/app/js/style_guide')
-rw-r--r--web-ui/app/js/style_guide/main.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/web-ui/app/js/style_guide/main.js b/web-ui/app/js/style_guide/main.js
index 8dc2b949..170d1187 100644
--- a/web-ui/app/js/style_guide/main.js
+++ b/web-ui/app/js/style_guide/main.js
@@ -14,13 +14,15 @@
* You should have received a copy of the GNU Affero General Public License
* along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
*/
+'use strict';
+
$(document).ready(function(){
$('a[href*=#]').click(function() {
- if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
- && location.hostname == this.hostname) {
+ if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') &&
+ location.hostname === this.hostname) {
var $target = $(this.hash);
- $target = $target.length && $target
- || $('[name=' + this.hash.slice(1) +']');
+ $target = $target.length && $target ||
+ $('[name=' + this.hash.slice(1) +']');
if ($target.length) {
var targetOffset = $target.offset().top;
$('html,body')