I would like implement the javascript background image changer on page load on Impresspages 4.2.3 as described on http://www.9lessons.info/2011/03/background-image-change-on-refresh-with.html. It works on my localhost but not working when moved to my hosting server.
I put this code below on "_header.php" between the tag:
<script type="text/javascript">
var totalCount = 4;
function ChangeIt()
{
var num = Math.ceil( Math.random() * totalCount );
document.body.background = 'http://localhost/halmaheradivecruise.com/theme/air/assets/img/'+num+'.jpg';
document.body.style.backgroundRepeat = "repeat";// Background repeat
}
</script>
and this code below in tag:
<script type="text/javascript">
ChangeIt();
</script>