jQuery check if attr = value April 27, 2023 by Tarik Just remove the .val(). Like: if ( $('html').attr('lang') == 'fr-FR' ) { // do this } else { // do that }