JSFiddle - React, Tailwind, and code Playground

by SpiceLab

HTML

<img src="https://www.tutorials.de/data/avatars/m/244/244972.jpg?1415390780" onclick="openzoom('1')" />
<div id="hintergrundtransparenz">foobar</div>

CSS

#hintergrundtransparenz {display:none}

JavaScript

function openzoom(x){
  document.getElementById('hintergrundtransparenz').style.display = 'block';
}