Add a basic opened and closed events on the dropdown
refactor the code to have a close and open function
Merge pull request #2175 from arthurio/master

Dropdown callbacks: closed, opened