JSFiddle - React, Tailwind, and code Playground
by pepelsbey
HTML
<div id="element-shmelement"></div>
CSS
DIV {
width:500px;
height:500px;
background:#069;
}
JavaScript
function init() {
var sh = 'shmelement';
var el = document.getElementById('element-' + sh)
el.onclick = function() {
alert('shm!');
}
}
document.addEventListener('DOMContentLoaded', init, false);