I have taken some time develop this for you
<html>
<body>
<img height="200px" width="200px" src="sc.png" id='image_1' style="display:none" />
<a class='testClass' data-id=image_1>Show Image</a><br>
<img src="sc.png" id='image_2' style="display:none" />
<a class='testClass' data-id=image_2>Show Image</a>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$('.testClass').on("click", function(){
console.log(document.getElementById(this.getAttribute("data-id")));
$("#"+this.getAttribute("data-id")).show();
});
});
</script>
</body>
</html>
sc.png is test file that i used.