Hello. I know this might be beyond normal help but if anyone can help I would appreciate it. I am trying to display images with different links to another page during different times of the day.
I have the code and the image changes depending on what time of day it is.
I need to add a link to a page that also changes with the photo.
Here is the code I found. I did add some appery code to it too.
/* This script and many more are available free online at
The JavaScript Source!! http://www.javascriptsource.com
Created by: Anonymous | http://musikimiz.googlepages.comLicensed under: Creative Commons License
*/
function pixTimeChange() {
var t=new Date();
var h = t.getHours();
var r1="files/views/assets/image/Themes_icon.png";
var r2="files/views/assets/image/Themes_icon.png";
var el=document.getElementById('customerHomePage_myimage');
Code: Select all
//added link to image
var y = $(document).off("click", '#customerHomePage_mobilecontainer [name="vinnyvinny"]').on({
click: function(event) {
if (!$(this).attr('disabled')) {
Apperyio.navigateTo('custBilling', {
reverse: false
});
}
} });
Code: Select all
// // See the time below. Note: The time is in 24 hour format.
// In the example here, "7" = 7 AM; "17" =5PM.
el.src = (h=7 && h) {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
};
}
}
addLoadEvent(function() {
pixTimeChange();
});