I'm using the following function to show and hide divs that contain loading images when the browser is working. It works fine in Firefox. In Chrome though it doesn't do this. The screen remains static with the button that begins the function calls in the "clicked" state, even though the mouse is not over it. If I use the developer tools to set breakpoints then I see the setVisibility() function get called and the loader divs get shown and hidden properly.
The function looks like this:
function setVisibility(id, visibility) {
if(document.getElementById(id)){
document.getElementById(id).style.display = visibility;
}
}
And here is an example of a show/hide call:
setVisibility("loader", "inline");
setVisibility("loader", 'none');
Any ideas?