ボタン1とボタン2で機能する関数を作成する必要があります..ボタン1をクリックすると、tを非表示にできますが、ボタン2に同じ関数を追加するにはどうすればよいですか?
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("#button1").click(function(){
$(this).hide();
});
});
</script>
</head>
<body>
<button id="button1">Button1</button>
<button id="button2">Button2</button>
</body>
</html>