Looking for a solution to replace loading text with a button only after the image has loaded onto the page.
Utilizing on.load
as follows:
$('img.house').on('load', function() {
$('.loading').hide();
$('#startgame').show();
});
The above code works flawlessly upon initial site visit, but fails to hide the .loading
div upon refreshing the page. However, performing a hard refresh solves the issue.
Any assistance or tips would be greatly appreciated!