How to use image id as source in jQuery attr('src',value)?
<p>I am facing a problem in a Jquery code. Please help me to fix this problem. </p>

<p>HTML Code for showing images:</p>

<pre><code>&lt;body&gt;
    &lt;div class="info_image"&gt;image1&lt;/div&gt;
    &lt;div class="info_image"&gt;image2&lt;/div&gt;
    &lt;div class="info_image"&gt;image3&lt;/div&gt;
</code></pre>

<p>The image links with id:</p>

<pre><code>    &lt;div class="reference"&gt;
            &lt;p&gt;&lt;img id="image1" src="brush-seller.jpg"/&gt;&lt;/p&gt;
            &lt;p&gt;&lt;img id="image2" src="Pest-seller.jpg"/&gt;&lt;/p&gt;
            &lt;p&gt;&lt;img id="image3" src="pick-seller.jpg"/&gt;&lt;/p&gt;
&lt;/body&gt;
</code></pre>

<p>Now the problem is with JavaScript. I have to use <strong>.attr('src',value)</strong> tag to use the image id as source and show that image in first 3 div. So far I found a code which didn't work:</p>

<pre><code>.attr('src','image/'+info_elem.find('.info_image').html())
</code></pre>

<p>Please help me to fix this jquery code.</p>
