Search code examples
javascriptjqueryloadtypeahead.jsautosuggest

typeahead.js load error "Uncaught ReferenceError: _ is not defined"


oHi guys, on page load i see this error in console: "Uncaught ReferenceError: _ is not defined"

i have this code in head:

<!-- Jquery -->
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>

<!-- Typeahead -->
<script src="js/typeahead/typeahead.js"></script>

I have no idea whats happening, and i cannot google anything about this kind of typeahead.js problem. I will appreciate any help. Thanks


Solution

  • Where did you get your tipeahead script? Looks like it relies on Underscore.js or Lo-Dash

    We need more information anyway (stacktrace, how you load the typeahead script, and its content).