Hi Alexander,
the key you gave for the CustomData object can also be used for retrieving the data again. And there's the data(...) method for doing so (pretty sure it's in the documentation examples; this is the API that looks and behaves like jQuery data()), so you can do:
var id = button.data("id");
Regards
Andreas