how to tie each button to an object in jquery code example
Example: jquery bind click
$( "#foo" ).bind( "click", function() {
alert( "User clicked on 'foo.'" );
});
$( "#foo" ).bind( "click", function() {
alert( "User clicked on 'foo.'" );
});