Files
OfficialSite/assets/scripts/modules/Title.js

28 lines
538 B
JavaScript
Raw Normal View History

/* jshint esnext: true */
2016-03-16 12:11:23 -04:00
import Module from './Module';
class Title extends Module {
constructor(options) {
super();
this.$el = options.$el;
this.$label = this.$el.find('.js-label');
this.$document.on('title.changeLabel', (event, value) => {
this.changeLabel(value);
});
}
changeLabel(value) {
this.$label.text(value);
}
// Destroy
// ==========================================================================
destroy() {
this.$document.off('title.changeLabel');
this.$el.off();
}
}
export default Title;