collapse js error on wip-2.0 #862

tuladhasum opened this Issue Dec 28, 2011 · 6 comments


None yet

3 participants


HTML markup

<button class="btn danger" data-toggle="collapse" data-target="#demo5">  simple collapsible</button>
<div id="demo5" class="collapse in"> … </div>

For some reason, I keep getting this error when I try to implement the collapse feature

Uncaught TypeError: Object [object Object] has no method 'on' [bootstrap-collapse.js:126]


Are you using the latest jQuery? It is vital you use 1.7.X, because that's when they introduced on method.


That might be the problem. I just checked, and it turns out I am using jQuery v1.6.2.
I will try changing it tomorrow at work.


jQuery 1.7 removed that error, but I couldn't make the collapse work.


It is an early work in progress, after all.


Yep. I have written a custom piece of js to implement this feature.
I was trying to apply this feature to a collapsible table.
It would be cool to have a collapsible table for bootstrap though. like this one

fat commented Jan 2, 2012

yep you need the latest jquery as @pokonski - if you have other problems with collapse though, please feel free to open more tickets against it. It should be relatively stable at this point.

@fat fat closed this Jan 2, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment