Lines Matching defs:element

30 var Typeahead = function (element, options) {
31 this.$element = jQuery(element);
56 this.value = this.$element.val() || this.$element.text();
58 this.focused = this.$element.is(':focus');
73 this.$element.data('active', val);
81 this.$element
93 this.$element.data('active', val);
103 this.$element
137 var pos = jQuery.extend({}, this.$element.position(), {
138 height: this.$element[0].offsetHeight
145 var element;
147 element = this.$menu;
149 element = this.$menu.appendTo(this.$appendTo);
150 this.hasSameParent = this.$appendTo.is(this.$element.parent());
152 element = this.$menu.insertAfter(this.$element);
157 // We cannot rely on the element position, need to position relative to the window
158 element.css('position', 'fixed');
159 var offset = this.$element.offset();
163 // The rules for bootstrap are: 'dropup' in the parent and 'dropdown-menu-right' in the element.
166 var dropup = jQuery(element).parent().hasClass('dropup');
168 var right = jQuery(element).hasClass('dropdown-menu-right');
172 element.css({ top: newTop, left: newLeft }).show();
175 element.css('width', this.$element.outerWidth() + 'px');
192 this.query = this.$element.val();
231 this.$element.data('active', items[0]);
233 this.$element.data('active', null);
358 if (text == self.$element.val()) {
360 self.$element.data('active', item);
368 this.$element.data('active', items.first().data('value'));
402 this.$element.val(this.displayText(newVal) || newVal);
422 this.$element.val(this.displayText(newVal) || newVal);
427 this.$element
435 this.$element.on('keydown.bootstrap3Typeahead', jQuery.proxy(this.keydown, this));
461 this.$element.data('typeahead', null);
462 this.$element.data('active', null);
463 this.$element
471 this.$element.unbind('keydown.bootstrap3-typeahead');
479 var isSupported = eventName in this.$element;
481 this.$element.setAttribute(eventName, 'return;');
482 isSupported = typeof this.$element[eventName] === 'function';
548 var currentValue = this.$element.val() || this.$element.text();
619 this.$element.focus();
628 this.$element.focus();
665 this.$element.focus();