$('#Button1').click(function () {
// code here
})
$('#Button2').click(function () {
// same code here
})
but the easier way is
$('#Button1, #Button2').click(function() {
// You can use 'this' to refer to the source element, for instance:
$(this).css("background-color", "blue");
});
Cheers :)