The context is: I'm doing ajax calls all over the place for processing forms on my site but generally, they are doing the same sort of thing and showing similar feedback. So I planned to write a function that does validation and an ajax call and then bind that to all forms on my site (with a certain class).
Done that. Works well.
Except.. in those cases where I want to do something slightly different on success.
Is there an elegant way I can leave that function in place but override it on a form by form basis when I need? it's just the success handling I want to change.