I'm confused. Does the alert work or not?
If it works, it means your jQuery is ok.
The e in function(e) passes the event of the object you clicked. In this case, the event is running a url. That shouldn't happen, that's why e.preventDefault() will prevent it.
Next step is inserting the AJAX part in the script.
I've already given you an example. Use jQuery's $.post() method.
It must call a controller/method (in CI). You can pass values to it, as shown in the example.
The method must end with an echo statement. The echoed text will be returned as return value to your jQuery script. You can use that to update the danger button.
Good luck.