Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Thornton <jacobthornton@gmail.com>2012-01-21 01:42:10 +0400
committerJacob Thornton <jacobthornton@gmail.com>2012-01-21 01:42:10 +0400
commit93c81522164421a03a9093502dae8125aa8b5584 (patch)
tree529a7a6eba955c05c2c0717c62592b86aeb949a8 /js/bootstrap-collapse.js
parentc75a59e74129d0519e0a011350d63ab22f7995a8 (diff)
only prevent default if getting data-href
Diffstat (limited to 'js/bootstrap-collapse.js')
-rw-r--r--js/bootstrap-collapse.js3
1 files changed, 1 insertions, 2 deletions
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)
})
})