universal deletegroup click function

universal deletegroup click function

Hi Everybody,

I am pretty new and I am trying to create universal deletegroup function. 
This is what I have:
  1. $('#DeleteGroup').click(function(){
  2.     $('#group_1').remove();
  3.     var data = 'group_id=id';

  4.     $.ajax({
  5.         url: '/async/deletegroup',
  6.         type: 'POST',
  7.         ....

But instead of having $('#group_1').remove(); to delete group with ID 1, I would like to have some kind of id paramater and end up with something like this: $('#group_id').remove();

I am wondering if there is a way to add id parametr to my #deleteGroup.click function.
Any help would be most welcome.

Thank you very much,
Petr