Use === and !== instead of == and !=

This commit is contained in:
Shea Bunge 2013-07-14 16:38:08 +10:00
parent 79d69e7593
commit 4c99b2aba8
3 changed files with 10 additions and 10 deletions

View file

@ -1,14 +1,14 @@
jQuery( document ).ready( function( $ ) {
$( document ).keydown( function( e ) {
var url = false;
if ( e.which == 37 ) { // Left arrow key code
if ( e.which === 37 ) { // Left arrow key code
url = $( '.previous-image a' ).attr( 'href' );
}
else if ( e.which == 39 ) { // Right arrow key code
else if ( e.which === 39 ) { // Right arrow key code
url = $( '.entry-attachment a' ).attr( 'href' );
}
if ( url && ( !$( 'textarea, input' ).is( ':focus' ) ) ) {
window.location = url;
}
} );
} );
} );