Lines Matching defs:options

30 var Typeahead = function (element, options) {
32 this.options = jQuery.extend({}, Typeahead.defaults, options);
33 this.matcher = this.options.matcher || this.matcher;
34 this.sorter = this.options.sorter || this.sorter;
35 this.select = this.options.select || this.select;
36 this.autoSelect = typeof this.options.autoSelect == 'boolean' ? this.options.autoSelect : true;
37 this.highlighter = this.options.highlighter || this.highlighter;
38 this.render = this.options.render || this.render;
39 this.updater = this.options.updater || this.updater;
40 this.displayText = this.options.displayText || this.displayText;
41 this.itemLink = this.options.itemLink || this.itemLink;
42 this.itemTitle = this.options.itemTitle || this.itemTitle;
43 this.followLinkOnSelect = this.options.followLinkOnSelect || this.followLinkOnSelect;
44 this.source = this.options.source;
45 this.delay = this.options.delay;
46 this.theme = this.options.theme && this.options.themes && this.options.themes[this.options.theme] || Typeahead.defaults.themes[Typeahead.defaults.theme];
47 this.$menu = jQuery(this.options.menu || this.theme.menu);
48 this.$appendTo = this.options.appendTo ? jQuery(this.options.appendTo) : null;
49 this.fitToElement = typeof this.options.fitToElement == 'boolean' ? this.options.fitToElement : false;
52 this.showHintOnFocus = typeof this.options.showHintOnFocus == 'boolean' || this.options.showHintOnFocus === 'all' ? this.options.showHintOnFocus : false;
53 this.afterSelect = this.options.afterSelect;
54 this.afterEmptySelect = this.options.afterEmptySelect;
59 this.changeInputOnSelect = this.options.changeInputOnSelect || this.changeInputOnSelect;
60 this.changeInputOnMove = this.options.changeInputOnMove || this.changeInputOnMove;
61 this.openLinkInNewTab = this.options.openLinkInNewTab || this.openLinkInNewTab;
62 this.selectOnBlur = this.options.selectOnBlur || this.selectOnBlur;
63 this.showCategoryHeader = this.options.showCategoryHeader || this.showCategoryHeader;
76 // Updater can be set to any random functions via "options" parameter in constructor above.
96 // Updater can be set to any random functions via "options" parameter in constructor above.
141 var scrollHeight = typeof this.options.scrollHeight == 'function' ?
142 this.options.scrollHeight.call() :
143 this.options.scrollHeight;
164 // Note that to get right alignment, you'll need to specify `menu` in the options to be:
174 if (this.options.fitToElement === true) {
195 if (this.query.length < this.options.minLength && !this.options.showHintOnFocus) {
226 if (!items.length && !this.options.addItem) {
236 if (this.options.items != 'all') {
237 items = items.slice(0, this.options.items);
241 if (this.options.addItem) {
242 items.push(this.options.addItem);
316 var _category = that.options.separator;
342 return jQuery(that.options.headerHtml || that.theme.headerHtml).text(item.name)[0];
346 return jQuery(that.options.headerDivider || that.theme.headerDivider)[0];
350 i = jQuery(that.options.item || that.theme.item).data('value', item);
351 i.find(that.options.itemContentSelector || that.theme.itemContentSelector)
352 .addBack(that.options.itemContentSelector || that.theme.itemContentSelector)
354 if (that.options.followLinkOnSelect) {
391 next = jQuery(this.$menu.find(jQuery(this.options.item || this.theme.item).prop('tagName'))[0]);
411 prev = this.$menu.find(jQuery(this.options.item || this.theme.item).prop('tagName')).last();
438 var itemTagName = jQuery(this.options.item || this.theme.item).prop('tagName');
594 if (this.options.showHintOnFocus && this.skipShowHintOnFocus !== true) {
595 if (this.options.showHintOnFocus === 'all') {
684 var options = typeof option == 'object' && option;
686 $this.data('typeahead', (data = new Typeahead(this, options)));