After looking at the page, I'm surprised it works in any browser. Here, is where it is activated:
Code:
<body id="page-index" onLoad="rollover()">
However, that tag appears in an invalid spot in your document. Apparently this is not messing up other things but has two problems as far as the rollover script goes.
- The body actually starts here (by implication - the head is closed and a tag which belongs in the body appears):
Code:
. . . ttp://static2.shopify.com/s/files/1/0004/7391/assets/AC_OETags.js?1239528441" type="text/javascript"></script>
<script src="http://static0.shopify.com/s/files/1/0004/7391/assets/pageear.js?1239528441" type="text/javascript"></script>
<script src="http://static0.shopify.com/s/files/1/0004/7391/assets/rollover.js?1239528441" type="text/javascript"></script>
</head>
<table style="border-top: 2px solid rgb(243, 217, 1); border-bottom: 2px solid rgb(243, 217, 1); font-family: Verdana; font-size: 14px; font-weight: normal; color: rgb(0, 102, 204); padding-bottom: 5px; padding-top: 5px; background-color: rgb(255, 255, 153); width: 100%; margin-left: auto; margin-right: auto;" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="text-align: center; vertical-align: middle;">BoutiqueHealth
Specials available on
trademe → <a title="Opens in fresh new tab or window »" rel="me" target="_blank" href="http://www.trademe.co.nz/Members/Listings.aspx?member=360635&v=Gallery&Y=0">click
here for a maximum deep discount offer</a> <span style="color: rgb(204, 0, 0); font-weight: bold;">»</span></td>
</tr>
</tbody>
</table>
<body id="page-index" onLoad="rollover()">
<div id="header">
<div class="co . . .
- There is another onload function:
Code:
function () {
if (_c) {
_c();
}
_b();
}
This overwrites the body onload. But since we cannot really tell what it does, it may somehow include the rollover() function in other browsers.
In any case, all should be fine if you get rid of the body onload call, and add (highlighted) to your rollover.js file:
Code:
function rollover() {
if (!document.getElementById) return
var imgOrSrc;
var imgPreload = new Array();
var images = document.getElementsByTagName('img');
for (var i = 0; i < images.length; i++) {
if (images[i].getAttribute('rsrc')) {
imgPreload[i] = new Image();
imgPreload[i].src = images[i].getAttribute('rsrc');
images[i].onmouseover = function() {
imgOrSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute('rsrc'))
}
images[i].onmouseout = function() {
this.setAttribute('src',imgOrSrc)
}
}
}
}
if (window.addEventListener)
window.addEventListener('load', rollover, false);
else if (window.attachEvent)
window.attachEvent('onload', rollover);
Bookmarks