Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It looks like after your first time calling this code, you are destroying #show, and thus, the next time, there is no more #show? I'm going to add some comments to your code to see if i'm understanding this correctly:</p> <pre><code>success: function() { // File has been successfully posted to request.php // We are now going to GET the contents of request.php (ignoring any response from the previous POST) // Also note, should probably put remainder of code in a callback to "load", so we can be sure it has had a chance to load!... $('#show').load("/admin/request.php").fadeIn("slow", function(){ setTimeout(function(){ $(function() { $("#show").fadeTo("slow", 0.01, function(){ $(this).slideUp("slow", function() { // Note! #show is being removed from the document here. It won't be available for future events. $(this).remove(); }); }); }); }, 2000); }); }, </code></pre> <p>Good luck!</p> <p><strong>EDIT</strong> Upon looking at this some more, I noticed you are creating a document "ready" event after your setTimeout?</p> <p>I'm trying to figure out the effect you want. It looks like you want to have something fade in after the upload finishes (in the <code>#show</code> div), wait a few seconds, then fade it out again? (Your <code>slideUp</code> is acting on a faded-out element, so the effect won't be seen.)</p> <p>How about something like this?</p> <pre><code>success: function() { // File has been successfully posted to request.php // We are now going to GET the contents of request.php (ignoring any response from the previous POST) $('#show').load("/admin/request.php", function() { $(this).fadeIn("slow", function() { setTimeout(function() { $("#show").fadeOut("slow", function() { // don't remove #show. Just empty it for using again next time. $(this).empty() }); }, 2000); }); }); }, </code></pre>
    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.
 

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