document.onclick = function(e){ var t = e.target; if (t.className='bla') { //Your code for onclick element t };