Majority of solutions presented here you can call Naive as described here (great article btw):, My solution: (live preview on Codepen: Convert getted result of InnerHTML text to an element, Javascript: retrieve hidden field value inside element with ID, select elements by class that have a specific child element with javascript, Multiple event handlers only firing on first element, not the target,