FIX memory leak because dettached element on inline function

Per [Bootstrap/Jacob's JS coding style](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#js), please remove the semicolons