src/dropdown.js
function Dropdown(element, completer, option) {
    this.$el       = Dropdown.createElement(option);
    this.completer = completer;
    this.id        = completer.id + 'dropdown';
    this._data     = []; // zipped data.
    this.$inputEl  = $(element);
    this.option    = option;

    // Override setPosition method.
    if (option.listPosition) { this.setPosition = option.listPosition; }
    if (option.height) { this.$el.height(option.height); }
    var self = this;
    $.each(['maxCount', 'placement', 'footer', 'header', 'noResultsMessage', 'className'], function (_i, name) {
      if (option[name] != null) { self[name] = option[name]; }
    });
    this._bindEvents(element);
    dropdownViews[this.id] = this;
  }
function Dropdown(element, completer, option) {
    this.$el       = Dropdown.createElement(option);
    this.completer = completer;
    this.id        = completer.id + 'dropdown';
    this._data     = []; // zipped data.
    this.$inputEl  = $(element);
    this.option    = option;

    // Override setPosition method.
    if (option.listPosition) { this.setPosition = option.listPosition; }
    if (option.height) { this.$el.height(option.height); }
    var self = this;
    $.each(['maxCount', 'placement', 'footer', 'header', 'noResultsMessage', 'className'], function (_i, name) {
      if (option[name] != null) { self[name] = option[name]; }
    });
    this._bindEvents(element);
    dropdownViews[this.id] = this;
  }
function Dropdown ( element , completer , option ) { this . $el = Dropdown . createElement ( option ) ; this . completer = completer ; this . id = completer . id + 'dropdown' ; this . _data = [ ] ; // zipped data. this . $inputEl = $ ( element ) ; this . option = option ; // Override setPosition method. if ( option . listPosition ) { this . setPosition = option . listPosition ; } if ( option . height ) { this . $el . height ( option . height ) ; } var self = this ; $ . each ( [ 'maxCount' , 'placement' , 'footer' , 'header' , 'noResultsMessage' , 'className' ] , function ( _i , name ) { if ( option [ name ] != null ) { self [ name ] = option [ name ] ; } } ) ; this . _bindEvents ( element ) ; dropdownViews [ this . id ] = this ; }
Construct Dropdown object.  element - Textarea or contenteditable element.
Construct Dropdown object . element - Textarea or contenteditable element .