danielstocks / jQuery-Collapse

A lightweight (~1kb) jQuery plugin that enables expanding and collapsing content
http://webcloud.se/jQuery-Collapse/
MIT License
679 stars 153 forks source link

uncaught typeerror: object [object Object] has no method 'on' #43

Closed bpsmpls closed 11 years ago

bpsmpls commented 11 years ago

Not sure where to put this, but I found a bug and a fix for it.

On line 42 of the jquery.collapse.js, Chrome throws an error: uncaught typeerror: object [object Object] has no method 'on'

Replacing the method 'on' with 'bind' fixes the issue. Found the solution here: http://stackoverflow.com/questions/10912346/uncaught-typeerror-object-object-object-has-no-method-on

danielstocks commented 11 years ago

What version of jQuery are you using?

The "on" method was introduced in jQuery 1.7. I won't be supporting older versions of jQuery, but you may reate a fork and support older versions if you wish (: