「閉じる」divをクリックすると、「基本テキスト」が表示されません。 要するに、第2の「クリック」機能を使用しないのはなぜですか?jquery:2つのクリック機能
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.4.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#sp").click(function(){
$("#info").html("<div><div id='close'>Close</div><div>new text</div></div>");
});
$("#close").click(function(){
$("#info").html("<div>basic text</div>");
});
});
</script>
<style>
</style>
</head>
<body>
<p id="sp">Click</p>
<div id="info">
<div>basic text</div>
</div>
</body>
</html>