jQuery won't bind events to <object> elements
It looks like when I do $("object").bind("<mouse-event>") the event isn't actually being bound to the element in Chrome and Firefox (not sure about IE). Using $("object").each(function() {this.addEventListener(...)}) works fine though.
I may have done something wrong (sorry if so).
Here's an example page (it won't let me upload a .html for some reason). The commented out portion works, the uncommented part doesn't.
- <html>
- <head>
- <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js"></script>
- <script type="text/javascript">
- $(function() {
- // $("object").each(function(i, obj) {
- // $(this).addEventListener("mouseover", function() {
- // alert("")
- // })
- // })
- $("object").hover(
- function() {
- alert("Object hovered")
- })
- })
- </script>
- </head>
- <body>
- <object data="http://www.google.com/images/logos/ps_logo2.png"></object>
- </body>
- </html>