Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax Loader Not Showing in Google Chrome
    primarykey
    data
    text
    <p>Although this has been discussed many times here in Stackoverflow, I couldn't get the loader gif to display in Google Chrome. In Firefox 3.6, the code I have below works just fine for displaying the little gif whenever I make an ajax call but the same code won't display anything if working with Google Chrome. Since our customer uses Chrome I have to make sure it is compatible.</p> <p>Here is the jQuery code which is inside the onLoad event:</p> <pre><code>var loader = $('&lt;div id="ajax-loader" class="ui-corner-all"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;') .appendTo("body") .hide().ajaxStart(function() { var relativeToDocument = false; var parent = loader.parent(); loader .css("top", (relativeToDocument ? $(window).scrollTop() : 0) + (parent.innerHeight() / 2) - (loader.height() / 2)) .css("left", (relativeToDocument ? $(window).scrollLeft() + parent.offset().left : 0) + (parent.innerWidth() / 2) - (loader.width() / 2)) .show(); }) .ajaxStop(function() { loader.hide(); }); </code></pre> <p>Does anyone know why it isn't displayed for chrome?</p> <p>EDIT: Adding some of my markup below;</p> <p>The css for the gif is here:</p> <pre><code>#ajax-loader { position: absolute; padding: 10px; } #ajax-loader span { background-image: url("../images/ajax-loader.gif"); width: 32px; height: 32px; display: block; } </code></pre> <p>The <a href="http://jsfiddle.net/rzXSx/" rel="nofollow">page</a> is here. Of course it looks bad because I haven't added the css files and other things. Plus, this is a MVC application so you won't have any data to load.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload