universal deletegroup click function
Hi Everybody,
I am pretty new and I am trying to create universal deletegroup function.
This is what I have:
- $('#DeleteGroup').click(function(){
- $('#group_1').remove();
- var data = 'group_id=id';
- $.ajax({
- url: '/async/deletegroup',
- type: 'POST',
- ....
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