Hi,
I would like to hide content to specific browsers: Opera and Safari.
Both script work fine alone. But when i mix them, as shown below, Opera just misses the part he should read.
Why is that?
Thanks for incomming answers.
Guillaume.
// fix z-index layer in Opera
function killOpera() {
var op = navigator.userAgent.indexOf('Opera') != -1;
if (op) {
document.getElementById('topSword').style.display = 'none';
document.getElementById('topSwordOpera').style.display = 'block';
}
}
onload = killOpera;
// -->
// fix z-index flash layer transparecy in Safari
function killSafari() {
var sa = navigator.userAgent.indexOf('Safari') != -1;
if (sa) {
document.getElementById('topSword').style.display = 'none';
document.getElementById('topSwordOpera').style.display = 'block';
}
}
onload = killSafari;
// -->
I would like to hide content to specific browsers: Opera and Safari.
Both script work fine alone. But when i mix them, as shown below, Opera just misses the part he should read.
Why is that?
Thanks for incomming answers.
Guillaume.
// fix z-index layer in Opera
function killOpera() {
var op = navigator.userAgent.indexOf('Opera') != -1;
if (op) {
document.getElementById('topSword').style.display = 'none';
document.getElementById('topSwordOpera').style.display = 'block';
}
}
onload = killOpera;
// -->
// fix z-index flash layer transparecy in Safari
function killSafari() {
var sa = navigator.userAgent.indexOf('Safari') != -1;
if (sa) {
document.getElementById('topSword').style.display = 'none';
document.getElementById('topSwordOpera').style.display = 'block';
}
}
onload = killSafari;
// -->