Lo so che è ridiculo... ma :gren:
Vorrei un semplice rollover che sia compatibile sia con IE, NS e Opera.
grazie.
Lo so che è ridiculo... ma :gren:
Vorrei un semplice rollover che sia compatibile sia con IE, NS e Opera.
grazie.
E dove si trova il problema?!
...I'm insane in the brain...
Il problema è che una volta ho preso un rollover e non andava con Opera.
Se tu mi potresti dare un semplice rollover che sia compatibile con IE NS e Opera.
E poi non so fare bene questa funzione.
Grazie mille!
posta il codice che gli dò un occhio
...I'm insane in the brain...
ecco:
function rollover() {
if (!document.getElementById) return
var imgOriginSrc;
var imgTemp = new Array();
var imgarr = document.getElementsByTagName('img');
for (var i = 0; i < imgarr.length; i++) {
if (imgarr[i].getAttribute('roll')) {
imgTemp[i] = new Image();
imgTemp[i].src = imgarr[i].getAttribute('roll');
imgarr[i].onmouseover = function() {
imgOriginSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute('roll'))
}
imgarr[i].onmouseout = function() {
this.setAttribute('src',imgOriginSrc)
}
}
}
}
onload=rollover;
[img]grafica/off.gif[/img]
Se tu hai qualcosa che sia meglio o più semplice, mi potresti darmi una "mano"?
Grazie.
scusa il ritardo ma ero impegnato
<html>
<head>
<script>
function swapOn(obj){
document.images[obj].src='immagine_off.gif'
}
function swapOff(obj){
document.images[obj].src='immagine_on.gif'
}
</script>
</head>
<body>
[img]immagine_on.gif[/img]
</body>
</html>
naturalmente al posto di immagine_on e immagine_off devi mettere le tue immagini.
...I'm insane in the brain...