javascript - Mouse over event not being triggered for a jQuery class selected element -


this question has answer here:

i have div on simple page retrieved through jquery's class selector. want attach mouse on event listener 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 stuff");  }); })  </script> </body> 

and here fiddle https://jsfiddle.net/jehanjaleel/xqtp2r3q/

right mouse on not firing, idea why?

i reopen because works in jsfiddle not on actual html page.

    <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 stuff"); }); })  </script> </body> 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -