Search code examples
javascriptjquerylaraveltypeaheades5-shim

Bloodhound typeahead undefined in console laravel


I am using typeahead with bloodhound which I successfully integrated with it but when i keypress on it it makes the tag but didnt search it from my ajax code. In console it says undefined bloodhound.


Solution

  • Undefined is usually happens when script didnt found the object or it is called before script.I am sure that your bloodhound script file is not loading or your js script is calling after the bloodhound file is loading.

    First call the bloodhound file in the footer and then use bloodhound script.