Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Upon reading the jQuery docs pages for <a href="http://api.jquery.com/jQuery.get/" rel="nofollow">jQuery.get()</a> and <a href="http://api.jquery.com/load/" rel="nofollow">jQuery.load()</a>, the callback argument is quoted as the following:</p> <blockquote> <p>"A callback function that is executed if the request succeeds."</p> </blockquote> <p>Let me stress the terms "request" and "succeeds". The request may succeed, but that does <em>not</em> mean that the content is <em>loaded</em>. Same problem as <code>.load()</code> — the functions aren't built the way I was thinking.</p> <p>If I want to trigger an event once the new content finally loads, I'll need to take a different approach.</p> <ul> <li>I could use the JS <code>onload</code> event, and trigger it by completely replacing an HTML element (having the replaced code contain an <code>onload</code> property). EDIT: Note that using HTML <code>iframe</code> elements is pretty awful, primitive, and "clunky". I just need to find a better way to trigger a function as soon as loading the new content finishes.</li> <li>Also, I could use jQuery to check the <code>.ready()</code> state of new content, but ("AFAIK" / as far as I know) that will <strong>only</strong> work if the checked content is a <strong>new</strong> HTML element, <strong>not</strong> a preexisting HTML element whose interior content is changed. The jQuery <code>.ready()</code> status of any preexisting element will (AFAIK) already be shown as "ready" despite if new content is loading. Perhaps I am wrong about this, and I would like to be corrected if so.</li> </ul> <p>Unless otherwise notified, this answer will be marked as the correct one. The original question was mistaken that <code>.load()</code> was all I needed. Cheers!</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.
 

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