I have a div which on my simple page is retrieved through jQuery's class selector. I want to then attach a mouse over event listener to this div...
<body>
<div class="stuffBox">
<h1>
stuff
</h1>
</div>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
(function(){
$(".stuffBox").mouseover(function() {
alert("Here is some stuff");
});
})
</script>
</body>
And here is the fiddle https://jsfiddle.net/jehanjaleel/xqtp2r3q/
Right now the mouse over is not firing, any idea why?
I would like to reopen this because it works in jsfiddle but not on an actual html page.