Twitter bootstrap 引导折叠ie9切换

Twitter bootstrap 引导折叠ie9切换,twitter-bootstrap,internet-explorer-9,collapse,Twitter Bootstrap,Internet Explorer 9,Collapse,这让我快发疯了。我相信这很容易,但我就是看不出来 我正在尝试使用twitter引导打开/关闭表单。当然,它可以在chrome上正常工作,但不能在IE9上正常工作。我创建了一个简单的js提琴,可以在以下两种情况下使用: <div class="container"> <div id='s'> this works </div> <button id='b'>toggle</button> </div> $(d

这让我快发疯了。我相信这很容易,但我就是看不出来

我正在尝试使用twitter引导打开/关闭表单。当然,它可以在chrome上正常工作,但不能在IE9上正常工作。我创建了一个简单的js提琴,可以在以下两种情况下使用:

<div class="container">
    <div id='s'> this works </div>
    <button id='b'>toggle</button>

</div>
$(document).ready(->
$('#s').collapse(toggle: true)

$('#b').click(-> 
  $('#s').collapse('toggle')
)
)
如果我在那里添加警报,我可以看到表单立即再次显示和隐藏

使用twitter引导程序2.3.2和jQuery 1.9.1。我的代码包含在引导插件之后,等等。 编辑:没关系。单击事件已附加到图标。当我使用div时,它起作用了,但不知道为什么

$(document).ready(->

$('#phone_call_form').collapse(toggle: true )
$('#addPhone').click(->
  $('#phone_call_form').collapse('toggle')
  # alert('this holds things up long enough for me to see form is opening and immediately closing')
)

# handlers for the buttons
$('#phone_call_save').click(->
  $('#new_phone_call').submit()
  $('#phone_call_form').collapse('hide')
)
$('#phone_call_cancel').click(->  
  $('#phone_call_form').collapse('hide')
)

)