JSFiddle - React, Tailwind, and code Playground
HTML
<!DOCTYPE html>
<html>
<head>
<title>jquery bug demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<style type="text/css">
div {
border: black 1px solid;
margin: 10px;
padding: 10px;
}
</style>
<script type="text/javascript">
$(function(){
$("#log").append("<p>initially, selector matches this:</p>");
$("select, input", "#container1").each(function(){
$("#log").append("<p> element with id #"+$(this).attr("id")+"</p>");
});
$("#log").append("<p>okay, click the elements to see the bug!</p>");
$("select, input", "#container1").live("click", function(){
$("#log").append("<p> i'm element with id #"+$(this).attr("id")+" and i have the event!</p>");
});
});
</script>
</head>
<body>
<div id="container1">
begin container 1
<br/>
<input type="text" id="text1" name="text1" value="text1" />
<br/>
<select id="select1" name="select1">
<option value="select1 option1">select1 option1</option>
<option value="select1 option2">select1 option2</option>
</select>
<br/>
end container 1
</div>
<div id="container2">
begin container 1
<br/>
<input type="text" id="text2" name="text2" value="text2" />
<br/>
<select id="select2" name="select1">
<option value="select2 option1">select2 option1</option>
<option value="select2 option2">select2 option2</option>
</select>
<br/>
end container 2
</div>
<div id="log">
...