1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 21:09:06 +02:00

all unit tests passing in ie7

This commit is contained in:
Jacob Thornton
2012-01-28 01:35:13 -08:00
parent 81c128fd0b
commit e61164e67a
10 changed files with 39 additions and 19 deletions

View File

@@ -124,8 +124,10 @@
$(function () {
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
var $this = $(this)
, target = $this.attr('data-target') || e.preventDefault() || $this.attr('href')
var $this = $(this), href
, target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data()
$(target).collapse(option)
})