I have this html code:
FOO FOO2
$('.edit').click(function(){ var theId = $(this).attr('id'); }
This will get you the ID of anything clicked with a class of .edit
.edit