typeahead.js icon indicating copy to clipboard operation
typeahead.js copied to clipboard

TypeError: Bloodhound is undefined

Open gokulphp opened this issue 9 years ago • 2 comments

I am using typeahead.bundle.js having version 0.11.1. I have used it like given below:

var posts = new Bloodhound({
	datumTokenizer: function(search_data) {
		return Bloodhound.tokenizers.whitespace(search_data.value);
	},
	queryTokenizer: Bloodhound.tokenizers.whitespace,
	local: search_data
});

I have included typeahead.bundle.js using require.js that is including this file before executing above code. When page loads, getting an error:

TypeError: Bloodhound is undefined

At line: queryTokenizer: Bloodhound.tokenizers.whitespace,

I am clueless whats going wrong here. Please help.

gokulphp avatar Jun 21 '17 11:06 gokulphp

@gokulphp Do you have a jsfiddle with this issue? I am not able to reproduce this issue by including jquery.js and typeahead.bundle.js

ghost avatar Dec 06 '17 20:12 ghost

Have you solved this problem? I have the same problem. with using requirejs

nnstn avatar Jun 26 '18 08:06 nnstn