Skip to content

Commit

Permalink
hotfix: error in case of missing bootstrap transition.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Emanuele Marchi committed Nov 7, 2014
1 parent 7665298 commit dcc720e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
6 changes: 5 additions & 1 deletion dist/js/bootstrap-switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,11 @@
if (!callback) {
return;
}
return this.$container.one($.support.transition.end, callback).emulateTransitionEnd(500);
if ($.support.transition) {
return this.$container.one("bsTransitionEnd", callback).emulateTransitionEnd(500);
} else {
return callback();
}
};

BootstrapSwitch.prototype._elementHandlers = function() {
Expand Down
Loading

0 comments on commit dcc720e

Please sign in to comment.