<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div onclick="displayTooltip()">Click Me</div>
<div onmouseover="displayTooltip()">Mouse Over Me</div>
<script>
function displayTooltip(e) {
var evt = e || event;
if (evt.type == 'mouseover') {
console.log('over!');
return;
}
console.log('tooltip!');
}
</script>
</body>
</html>