I've got the following code http://jsfiddle.net/yc7sj3pt/2/
document.getElementById('obj_one').addEventListener('mouseover', function(){
var e = document.createEvent('HTMLEvents');
e.initEvent('mouseover', true, false);
document.getElementById('obj_two').dispatchEvent(e);
console.log('hover');
}, false);
I'm trying to make the #obj_two
react to hover (thus changing to color red) when I mouseover
on #obj_one
, but it is not working. What am I doing wrong?