Commit 93c81522 authored by Jacob Thornton's avatar Jacob Thornton

only prevent default if getting data-href

parent c75a59e7
......@@ -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)
})
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment