171
rated 0 times
[
173]
[
2]
/ answers: 1 / hits: 20033
/ 12 Years ago, thu, march 7, 2013, 12:00:00
I can't use jQuery for this part of the project due to various reasons. SO I need to detect this in vanilla js. I tried this but it doesn't work:
var myDiv = document.getElementById('foo');
myDiv.onmouseenter = function() {
alert('entered');
}
myDiv.onmouseleave = function() {
alert('left');
}
More From » javascript