google chrome - jQuery: HTML is not updated after manipulating <img src> paths -


i loading external content via jquery method load , manipulate src attribute of img elements loaded 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 parent html via firebug, source code changed , reflects new image paths. however, html rendered within browser not updated , points old path.

in addition, getting following error within chrome:

xmlhttprequest cannot load file:///.../additional_content.html. origin null not allowed access-control-allow-origin. 

can me, please?

the 'origin null not allowed access-control-allow-origin.' happening because opening page locally on machine , not via web address. chrome checking not making cross-domain calls , has decided can't verify calls because local. may clue why images aren't loading - relative path you've given may causing issues. if save html shows in jquery new flat html file , open in same location, images show?


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -