Sha256: 29ed538a1791d67e2a051598144df3afb0752644e203a31420e3ab1b3aeee4a5

Contents?: true

Size: 649 Bytes

Versions: 7

Compression:

Stored size: 649 Bytes

Contents

/*
 * typeahead.js
 * https://github.com/twitter/typeahead.js
 * Copyright 2013-2014 Twitter, Inc. and other contributors; Licensed MIT
 */

var EventBus = (function() {
  'use strict';

  var namespace = 'typeahead:';

  // constructor
  // -----------

  function EventBus(o) {
    if (!o || !o.el) {
      $.error('EventBus initialized without el');
    }

    this.$el = $(o.el);
  }

  // instance methods
  // ----------------

  _.mixin(EventBus.prototype, {

    // ### public

    trigger: function(type) {
      var args = [].slice.call(arguments, 1);

      this.$el.trigger(namespace + type, args);
    }
  });

  return EventBus;
})();

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
iqvoc-4.12.1 vendor/assets/bower_components/typeahead.js/src/typeahead/event_bus.js
iqvoc-4.12.0 vendor/assets/bower_components/typeahead.js/src/typeahead/event_bus.js
iqvoc-4.11.1 vendor/assets/bower_components/typeahead.js/src/typeahead/event_bus.js
iqvoc-4.11.0 vendor/assets/bower_components/typeahead.js/src/typeahead/event_bus.js
iqvoc-4.10.0 vendor/assets/bower_components/typeahead.js/src/typeahead/event_bus.js
iqvoc-4.9.0 vendor/assets/bower_components/typeahead.js/src/typeahead/event_bus.js
iqvoc-4.8.2 vendor/assets/bower_components/typeahead.js/src/typeahead/event_bus.js