I have some loading text which I want to replace with a button only if the image has loaded onto the page.
I'm using on.load
like so:
$('img.house').on('load', function() {
$('.loading').hide();
$('#startgame').show();
});
This works great when I go to the site first time but when I then refresh the page It doesn't hide the .loading
div.
If I then do a hard refresh on the page, it works...
Can anyone help me please?