var randomColor = function(e){
var r = () => Math.round(Math.random()*255);
e.target.style.color = "rgb(" + [r(),r(),r()].join(',') + ")";
}
$('H1.question__title').on('mouseover', randomColor);
document.querySelector('h1.question__title')
.addEventListener('mouseover', randomColor);
function pad(n){
return n.length<2?'0'+n:n;
}
function rndHex(){
var base = 16,
resultNum = Math.floor(Math.random()*base*base).toString(base);
return pad(resultNum);
}
function rndHexColor(){
return'#'+rndHex()+rndHex()+rndHex();
}
function changeColor(){
this .style.backgroundColor=rndHexColor();
}
document.getElementById('ID_of_element').addEventListener('mouseenter', changeColor);