Have you ever encountered issues with a CSS background image failing to load? What might be the underlying cause?
I've written some Javascript code that looks like this:
function progressBar(file_id) {
pbar = ($("<div />").attr('id',file_id+"-statusicon").css({"background-image" : "url('../img/test-skip-icon.png')", "width" : "16px", "height" : "16px"}));
$("#"+file_id+" .status").append(pbar);
}
and then I invoke it in another function:
progressBar(file_id);
The issue at hand is that on occasion, the image loads correctly, while other times it does not. The size of the PNG image is approximately 9KB.
Any ideas or insights regarding this dilemma?