You have to add the custom JavaScript to the theme (probably best in the footer) then use or create an ID for the header that will be used to change the image.
The custom javascript is as follows:
<!--
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
Videos_over = newImage("https://sites.google.com/site/thestampinschach/Videos-over.png");
Videos_Rewards_over = newImage("https://sites.google.com/site/thestampinschach/Videos-Rewards_over.png");
Rewards_over = newImage("https://sites.google.com/site/thestampinschach/Rewards-over.png");
Rewards_Join_over = newImage("https://sites.google.com/site/thestampinschach/Rewards-Join_over.png");
Join_over = newImage("https://sites.google.com/site/thestampinschach/Join-over.png");
Join_Specials_over = newImage("https://sites.google.com/site/thestampinschach/Join-Specials_over.png");
Specials_over = newImage("https://sites.google.com/site/thestampinschach/Specials-over.png");
Specials_Products_over = newImage("https://sites.google.com/site/thestampinschach/Specials-Products_over.png");
Products_Specials_over = newImage("https://sites.google.com/site/thestampinschach/Products-Specials_over.png");
Products_over = newImage("https://sites.google.com/site/thestampinschach/Products-over.png");
Awards_over = newImage("https://sites.google.com/site/thestampinschach/Awards-over.png");
preloadFlag = true;
}
}
// -->
Just add it and modify accordingly.
Thanks devbynature!
I’m so NOT a coder. I copied the custom code into the footer.php for the custom theme I’m working with. How do I go about “use or create an ID for the header that will be used to change the image.”
Got it; copied the html that calls the table and images into the header, and the java script into the footer. also had to set the var preloadFlag equal to true in order for it to work. Thanks devbynature!