I am trying to show an image in div when the same image is clicked in a different div. I have the following code to do that but it is not working. Java Script:
function showDiv() {
document.getElementById(this.id).style.display = "show";
}
HTML Code:
<div class="row">
<div class="col-md-4"><a href="#"><img id="1"
src="images/gmail.png" onclick="showDiv()"></a></div>
<div class="col-md-4"><a href="#"><img id="2"
src="images/calender.png" onclick="showDiv()"></a></div>
<div class="col-md-4"><a href="#"><img id="3"
src="images/Drive.png" onclick="showDiv()"></a></div>
</div>
Please use javascript function only without libraries.
showDiv