]> git.ipfire.org Git - thirdparty/bootstrap.git/commit
Add jquery.ready hook after defining plugin, to avoid breakage when used with moderni... 362/head
authorSteve Purcell <steve@sanityinc.com>
Mon, 3 Oct 2011 09:05:43 +0000 (10:05 +0100)
committerSteve Purcell <steve@sanityinc.com>
Mon, 3 Oct 2011 09:05:43 +0000 (10:05 +0100)
commitbdbb1c92aab9e9379341c80b8d1c53cc14ac7198
treec998d6513d5e8d2bd19b6d5388da6f141e9cb579
parent7e01ff8a15f9024fdebc3859283ccc1f4c63cec7
Add jquery.ready hook after defining plugin, to avoid breakage when used with modernizr/yepnope

See https://gist.github.com/1258742 for an example, which results in the error

"TypeError: Object has no method 'dropdown' at bootstrap-dropdown.js line 31"

It looks like in these circumstances, the functions hooked into
jquery.ready get run immediately, and so applying the dropdown
behavior to specific elements before defining the 'dropdown' method
causes breakage.
js/bootstrap-dropdown.js