I have a example html menu:
A
You can find the id with this.id
this.id
$('.menu_button').click(function() { if ( this.id == "m1" ) .... })
But if the code is completely different for each button, then it may not be useful to use it like that but instead bind a different handler per id.