<script type="text/javascript">
$(function(){
$('#example')[0].onmouseover = function(event) {
alert("something");
};
});
</script>
<body>
<img id="example" src="example.jpg" " alt="ooooh! ahhhh!"/>
</body
Why do we need [0] behind example id ?
why it's not working if we remove [0] ?