diff --git a/js/bootstrap-collapse.js b/js/bootstrap-collapse.js index 2521b7c7a7..9278f66d0e 100644 --- a/js/bootstrap-collapse.js +++ b/js/bootstrap-collapse.js @@ -125,9 +125,8 @@ $(function () { $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) { var $this = $(this) - , target = $this.attr('data-target') || $this.attr('href') + , target = $this.attr('data-target') || e.preventDefault() || $this.attr('href') , option = $(target).data('collapse') ? 'toggle' : $this.data() - e.preventDefault() $(target).collapse(option) }) })