add support for an onHide action
Merge pull request #6 from kamal/onhide-action

Add support for an onHide action