I am loading external content via the jQuery method load and manipulate the src attribute of the img elements previously loaded as follows:
<div id="content"></div>
<script>
$("#content").load("additional_content.html #content table", function() {
$("#content").find("img").each(function() {
$(this).attr("src", "new_path/" + $(this).attr("src"));
});
});
</script>
While inspecting the parent HTML via Firebug, the source code changed and reflects the new image paths. However, the HTML rendered within the browser was not updated and points to the old path.
In addition, I am getting the following error within Chrome:
XMLHttpRequest cannot load file:///.../additional_content.html. Origin null is not allowed by Access-Control-Allow-Origin.
Can someone help me, please?