dispatch

I'm changeable text. Go head. Change me.

var target = document.getElementById('dispatch-target');

var i = document.getElementById('dispatch-trigger');

var s = document.getElementById('dispatch-trigger-select');

dispatch.on('textupdate', function(data){
  target.innerHTML = data.message || '';
});

i.addEventListener('keyup', function(){
  dispatch.trigger('textupdate', { message: this.value });
});

s.addEventListener('change', function(){
  if(this.value !== '-1') {
  dispatch.trigger('textupdate', { message: this.value });
  }
});
      
Download