Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My first thought is just that this toggle is happening so fast that you do not even need the ajaxload.gif at all. So, if that is the case, that is a good thing, right?</p> <p>My second thought is in how you are re-replacing the ajaxload.gif with whatever the header text was...when and how does this callback happen?</p> <p>My third thought is that everything is happening very quick, which is good, but you still want to show the loader no matter what...if that is the case, throwing a .delay(500) or whatever amount of time into your chain, should make it hold. I feel like there is more code involved that you did not show, could ya show this?</p> <p>Here is my quick thought to try in the mean time....</p> <pre><code>$( function(){ var header = $('#Header'); header.bind('click', function(){ $(this).html('&lt;img src="images/ajaxload.gif"&gt;'); $([parentHeaderName=something]).delay(500).toggle(); }); }); </code></pre> <p>Now this will actually make the toggle wait before firing, so, you might want to put that delay on the chain that happens right BEFORE you replace the ajaxload.gif with the header text again....</p> <p>I hope this helped in some way, otherwise give me more info and i'd be happy to take a further look.</p> <p>EDIT:</p> <p>Ok, now i'm thinking it has to do with the images not being loaded, and the alert is giving these images time to load. Because these images are not on the page in the first place, the page has no reference to them before you load them in, so this could me messing with your timing...maybe trying doing a load, then on the callback, set your click...if you are using jquery 1.5, when might help...</p> <pre><code>$.when( $('&lt;img src="images/collapse.gif" /&gt;').load(), $('&lt;img src="images/expand.gif" /&gt;').load() ).then( clickSetUp ); </code></pre> <p>clickSetUp being your click function...</p> <p>Give it a try, ill be around :)</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.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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