Last active
January 2, 2016 10:59
-
-
Save joechrysler/8293332 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
window.onload = function (e) { | |
var my_image = document.getElementById("image_id"); // Get a reference to the image tag | |
var d = new Date(); // Instantiate a new date object | |
if (d.getDay() == 3) { // Sunday = 0, Monday = 1, etc... // If today is Wednesday | |
my_image.src = "path/to/other/image.png"; // Change the image's src attribute | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment