JSFiddle - React, Tailwind, and code Playground
HTML
<script type="text/javascript" language="javascript">
var pos = 0;
function showPic (whichpic) {
if (document.getElementById) {
try {
if ((document.getElementById('placeholder1').src+
document.getElementById('placeholder2').src+
document.getElementById('placeholder3').src).search(whichpic.href) > -1)
throw "blah";
document.getElementById('placeholder'+ ++pos).src = whichpic.href;
//document.getElementById('placeholder2').src = whichpic.href;
//document.getElementById('placeholder3').src = whichpic.href;
if (whichpic.title) {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.title;
} else {
document.getElementById('desc').childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
}
return false;
} catch(e) {
alert("u mad?");
return false;
}
} else {
return true;
}
}
</script>
<div style="border: 1px solid #999; padding: 1em; margin: 0 0 15px 0;">
<ul>
<li><a onclick="return showPic(this)" href="http://jsfiddle.net/img/ico-add-resource.png" title="img 1">img 1</a></li>
<li><a onclick="return showPic(this)" href="http://jsfiddle.net/img/info-close.png" title="img 2">img 2</a></li>
<li><a onclick="return showPic(this)" href="http://jsfiddle.net/img/keys.png" title="img 3">img 3</a></li>
</ul>
<p id="desc">Choose an image to begin</p>
<img id="placeholder1" src="http://jsfiddle.net/img/shadow.gif" alt="" />
<img id="placeholder2" src="http://jsfiddle.net/img/shadow.gif" alt="" />
<img id="placeholder3" src="http://jsfiddle.net/img/shadow.gif" alt="" />
</div>