jQuery trigger mouseenter not working in Internet explorer 8 -


i tried trigger mouseenter event manually using $("element").trigger("mouseenter"). works fine in browser except ie8.

<html><head>     <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>     <meta charset="utf-8">     </head>     <body>       <div id="box" style="border:5px solid red;width:100px;height:100px">      </div>     <script>     $(function(){       $("#box").mouseenter( function(event){         console.log("mouseenter triggered!!");       });       $("#box").trigger("mouseenter");       //$("#box").mouseenter();     });  </script>     </body></html> 

ie8 not have lot of support newer versions of jquery. know jquery says isn't true. try using older library, before jquery 1.6. add browser detection function switch between 2 libraries.

--edit-- ok, got marked down repeatedly there let me expand answer. not suggesting abandoning newer jq libraries because indeed stupid.

test see if feature works older jq library. if have try using modernizr or other kind of detection software serve old jquery library browser. if doesn't -- , shouldn't in cases -- serve newer jquery library.

--edit 2-- , indeed seemed solve poster's problem, eh?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

.htaccess - Matching full URL in RewriteCond -