EDITABLE CODE:
LiveDemo:jQuery - Using Event Callback Method
Note:If no value is returned , jQuery removes all classes from the element.