how to modify the value of src attribute of <img> tag using jquery or javascript
<p>I am parsing a html string fragment and changing the src attribute of image tags. (i.e. replacing paths that start with ".."</p>

<pre><code>var hstr = $.parseHTML(str);
$(hstr).find('img').each(function(e){
var srcvalue = $(this).attr('src');
srcvalue = srcvalue.replace(/../gi, "");
$(this).attr('src', srcvalue);
});
</code></pre>

<p>then setting the contents of a div element by appending the result</p>

<pre><code>document.getElementById('#section').append($(hstr));
</code></pre>

<p>but it is not working... can anyone tell me what is going wrong ?</p>
