From c43e93d935ba46bd0ffb9d13dcafdcd41a278cbc Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 19 Nov 2013 03:49:09 +0000 Subject: [PATCH] Fix spaces/tabs in Twenty Fourteen JS, allowing JSHint to run clean for these files. props dougwollison. fixes #26031, #26032. Built from https://develop.svn.wordpress.org/trunk@26261 git-svn-id: http://core.svn.wordpress.org/trunk@26167 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyfourteen/js/functions.js | 6 +++--- wp-content/themes/twentyfourteen/js/slider.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-content/themes/twentyfourteen/js/functions.js b/wp-content/themes/twentyfourteen/js/functions.js index fac6f334cc..fad6c00208 100644 --- a/wp-content/themes/twentyfourteen/js/functions.js +++ b/wp-content/themes/twentyfourteen/js/functions.js @@ -1,6 +1,6 @@ ( function( $ ) { var body = $( 'body' ), - _window = $( window ); + _window = $( window ); // Enable menu toggle for small screens. ( function() { @@ -48,7 +48,7 @@ // Search toggle. $( '.search-toggle' ).on( 'click.twentyfourteen', function() { var that = $( this ), - wrapper = $( '.search-box-wrapper' ); + wrapper = $( '.search-box-wrapper' ); that.toggleClass( 'active' ); wrapper.toggleClass( 'hide' ); @@ -65,7 +65,7 @@ * The callback on the scroll event is only added if there is a header * image and we are not on mobile. */ - if ( _window.width() > 781 ) { + if ( _window.width() > 781 ) { var mastheadHeight = $( '#masthead' ).height(), toolbarOffset, mastheadOffset; diff --git a/wp-content/themes/twentyfourteen/js/slider.js b/wp-content/themes/twentyfourteen/js/slider.js index e2740869c2..9c83d775e0 100644 --- a/wp-content/themes/twentyfourteen/js/slider.js +++ b/wp-content/themes/twentyfourteen/js/slider.js @@ -244,7 +244,7 @@ localY = e.touches[0].pageY; offset = ( slider.animatingTo === slider.last ) ? 0 : - ( slider.currentSlide === slider.last ) ? slider.limit : ( slider.currentSlide + slider.cloneOffset ) * cwidth; + ( slider.currentSlide === slider.last ) ? slider.limit : ( slider.currentSlide + slider.cloneOffset ) * cwidth; startX = localX; startY = localY;