<button id="first">Click me first</button>
$('#first').click(function(){
$('body').append('<button id="second">Now click me</button>');
});
$('#second').click(function(){
$(this).hide();
});
当#first被点击时,#second被附加。当#second被点击时,我希望它隐藏自己。
为什么这不起作用?