jquery if attribute

JavaScript
if ( $('html').attr('lang') == 'fr-FR' ) {
    // do this
} else {
    // do that
}
Source

Also in JavaScript: