I have this javascript function that's supposed to open a different div in chrome than in other browsers. The proper div opens in firefox, internet explorer, safari, and chrome, but opera opens the chrome div instead of the other div. Is there a way to stop opera from performing the chrome function?
function Browser() {
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
if (is_chrome) {
document.getElementById('chrome').style.display = 'block';
document.getElementById('notchrome').style.display = 'none';
}
}