JSFiddle - React, Tailwind, and code Playground

HTML

<script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js"></script>
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">

<div id="hello">
    <div>
        Hello <div>Child-Of-Hello</div>
    </div>
</div>
<br />
<div id="goodbye">Goodbye <div>Child-Of-Goodbye</div></div>

JavaScript

function fun(evt) {
    var target = $(evt.target);    
    if (target.parents('div#hello').length) {
        alert('Your clicked element is having div#hello as parent');
    }
}


$(document).bind('click', fun);