function bind (cssSelectors, events, callback) {
events = events.split(',');
let elements = document.querySelectorAll(cssSelectors);
elements.forEach(element => {
events.forEach(event => {
element.addEventListener(event, callback)
})
})
}
bind('li > a, p a, div button', 'click, keypress', function (e) {
e.preventDefault();
alert(this.innerText);
});