How to load picture images via click on a picture?
<p>At the moment i load default images for every picture in my app. I want to load the real picture of all images in div 5 if i click on any picture of div 5. At the moment i use the onclick event of the img tag with: </p>

<pre><code>switchImg(this, "LINK_FOR_PICTURE")
</code></pre>

<p>my js snippet:</p>

<pre><code>function switchImg(img, url){
  $(img).attr("src", url);
}
</code></pre>

<p>At the moment it only loads the picture that i clicked on.</p>

<p>here the HTML snippet:</p>

<pre><code>&lt;div id="1"&gt;
&lt;/div&gt;

&lt;div id="2"&gt;
&lt;/div&gt;

..

&lt;div id="5"&gt;

&lt;img src="DEFAULT_IMG" onclick="switchImg(this, "LINK_FOR_PICTURE_1")" alt="No_picture"&gt;
&lt;/div&gt;
&lt;img src="DEFAULT_IMG" onclick="switchImg(this, "LINK_FOR_PICTURE_2")" alt="No_picture"&gt;
&lt;/div&gt;
&lt;img src="DEFAULT_IMG" onclick="switchImg(this, "LINK_FOR_PICTURE_3")" alt="No_picture"&gt;
&lt;/div&gt;
.....

&lt;/div&gt;
</code></pre>

<p>How do i need to change my code that following condition is true:</p>

<ul>
<li>i click on any picture in div id=5 and all this pictures gets the correct picture link (LINK_FOR_PICTURE_1, LINK_FOR_PICTURE_2, etc) as src. The other pictures in the other divs don`t change and still display the default img. (Div id 5 is an example the same procedure should be possible for other divs with pictures).</li>
</ul>

<p>Please keep in mind that the img link changes for every picture.</p>
