Properly attach the event listener to the correct selector and fix on the options passed on in the JQuery API. However, a new bug comes from this fix when both data-widget and Jquery API is set where the event listener will be triggered twice
Should result in better compression (aprox. -10% from the compressed adminlte.min.js) and should be easier to see unused/undefined variables on lint stage.