added detachedCallbacks and some optimization
Merge branch 'master' of https://github.com/earllee/bootstrap-modal-element
wrap in IIFE