Here's the problem; I've got a 'loading' image -- it's just the standard spinner.gif animation that is normally used to indicate that something is going on behind the scenes. Here's the code:
$(document).ready(function() {
var spinner = $('<img />').attr('src', '/media/images/icons/spinner.gif');
var loadingText = $('<span id="loader">Loading...</span>').prepend(spinner);
$(loadingText).appendTo('#messages');
[... other jquery code here ...]
After other functions complete, the following removes the loading image and text:
$(loadingText).remove();
The problem is that whenever you click 'refresh' within your browser, the loading text appears again, as it should, but the image doesn't show up. Only upon closing the tab or window and reopening the page will the image appear correctly with the loading text. I'm stumped, any ideas? (thanks in advance)