trigger events on open and close
Fixed transitionEnd function
Add events log