1var attr = $(this).attr('name');
2
3// For some browsers, `attr` is undefined; for others,
4// `attr` is false. Check for both.
5if (typeof attr !== typeof undefined && attr !== false) {
6 // ...
7}
1if ( $('html').attr('lang') == 'fr-FR' ) {
2 // do this
3} else {
4 // do that
5}