ブラウザ判定(html要素にクラス付与)
var user = new getUser();
user.getBrows();
function getUser(){
this.getBrows = function(){
var _ua = window.navigator.userAgent;
if (_ua.match(/MSIE/) || _ua.match(/Trident/)) {
this.brows = 'is_ie';
$('html').addClass('is_ie');
}else if (_ua.indexOf("Edge") > -1) {
this.brows = 'is_edge';
$('html').addClass('is_edge is_ie11');
}else if (_ua.indexOf("Firefox") > -1) {
this.brows = 'is_firefox';
$('html').addClass('is_firefox');
}else if (_ua.indexOf("Chrome") > -1) {
this.brows = 'is_chrome';
$('html').addClass('is_chrome');
}else if (_ua.indexOf("Opera") > -1) {
this.brows = 'is_opera';
$('html').addClass('is_opera');
}else if(_ua.indexOf("Safari") > -1) {
this.brows = 'is_safari';
$('html').addClass('is_safari');
}else {
this.brows = 'is_other';
$('html').addClass('is_other');
}
return false;
}
};