axel-zarate / js-custom-select

Custom auto-complete select box for AngularJS and Bootstrap
MIT License
68 stars 59 forks source link

Error 'dropdown' is not a function #18

Closed Amenel closed 8 years ago

Amenel commented 8 years ago

I haven't been able to instantiate this directive in an existing project that I've joined recently because I get this error in Firebug at line 124: dropdownElement.eq(...).dropdown is not a function

Are there other dependencies than the ones (AngularJS, jQuery and Bootstrap) indicated in the readme file? Which library is supposed to provide that "dropdown" function? Thanks.

Versions:

Screenshot of the Network panel in Firebug right after the error has occurred: js-custom-select-error

I've done a quick plunk and I still can't get the widget to work.

Thank you.

axel-zarate commented 8 years ago

Hi, Make sure you're referencing the jQuery script before Angular. When angular loads, if jQuery is not present, it will load its implementation of jqlite, for which the jQuery plugins won't work directly.

Amenel commented 8 years ago

Hi, That was indeed the root cause of the problem. FontAwesome is also required. Many thanks.