Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>It suddenly started working with the following code:</p> <pre><code>$.get(urlToLoad, {}, function(data, status, request){ var safeData = $(innerShiv(data, false)), newModules = safeData.find(".module"), newScript = safeData.find("script#cfLoadMap"); // Update Each module newModules.each(function(i){ var jqoThis = $(this), thisId = "#" + jqoThis.attr("id"), newModule = jqoThis, newModBody = jqoThis.find(".mod-body"), curModule = $("body").find(thisId), curModBody = curModule.find(".mod-body"); // Varies by id, this one is used by the map area. curModBody.html(innerShiv(newModBody.html())); }); // each // Make sure plugins are bound to new content $("body").oneTime(100, function(){ // Various things get initiated here // Maps -- this one works: Chrome, Firefox, IE7, Opera $("head").append(newScript); // Maps -- these did not work /* // Firefox only (but Firefox always works) runScript = new Function(newScript.text()); runScript(); */ /* // Firefox only (but Firefox always works) eval(newScript.text()); */ }); // oneTime }, "html"); // get </code></pre> <p>One thing I <em>did</em> notice for sure was that without innerShiv, in all my browsers, $(data).find("script#cfLoadMap").text() was <strong>blank</strong> -- which I did <em>not</em> expect.</p> <p>However, I don't really see how this is different from what I had tried before and which failed. If someone spots a substantive difference, please let me know, for future reference?</p> <p>(Note: it doesn't seem to make a difference that the Map bit is placed in the timeout, it works as well above it.)</p>
 

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