Side navigation
#5724 closed bug (invalid)
Opened December 29, 2009 12:47AM UTC
Closed November 20, 2010 09:32PM UTC
'before' can not be realized when applied to <object> on I.E. 6
Reported by: | gittrac | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.5 |
Component: | manipulation | Version: | 1.4.4 |
Keywords: | before object ie6 | Cc: | |
Blocked by: | Blocking: |
Description
I have tried to use $("object").before("simple test")
and it won't work on I.E. 6 ( haven't tried I.E. 7+). Is this a known issue?
Or is it an issue at all? Any other way to add a "<div>" with identifier before "<object>"?
sample code: see the following
<html>
<head>
<style type="text/css">
</style>
</head>
<body>
<br>
I don't understand.
<br>
<object width="425" height="355" id="obj">
<param name="movie" value="http://www.youtube.com/v/0Bmhjf0rKe8w?rel=1&fs=1"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowScriptAccess" value="true"></param>
<embed src="http://www.youtube.com/v/0Bmhjf0rKe8?rel=1&fs=1" type="application/x-shockwave-flash" width="425" height="355" allowfullscreen="true" allowscriptaccess="true"></embed>
</object>
<br>
<br>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function() {
$("object").before("<div>ok, a simpler version, does it work?</div>");
});
</script>
</body>
</html>
Attachments (1)
Change History (5)
Changed June 13, 2010 11:23PM UTC by comment:1
component: | unfiled → manipulation |
---|---|
keywords: | before object → before object ie6 |
Changed November 20, 2010 05:26PM UTC by comment:2
http://jsfiddle.net/dmethvin/cp3Qh/
Worked for me in IE8; I didn't have IE6 to test so I'll leave it as new.
Changed November 20, 2010 07:02PM UTC by comment:3
test case not a bug with before but with IE6 having problems with object/embed tags
Changed November 20, 2010 07:02PM UTC by comment:4
milestone: | 1.4 → 1.5 |
---|---|
priority: | major → low |
version: | 1.3.2 → 1.4.4 |
Changed November 20, 2010 09:32PM UTC by comment:5
_comment0: | Thanks for the report, but this is not a jQuery bug. The `<object>` code you are using is invalid, so IE6/7 use the inner `<embed>` and drop the outer `<object>` from the DOM. While this behaviour is technically incorrect, all you need to do is append before the `<embed>` instead, or fix the HTML so it looks like this: \ \ {{{ \ #!html \ <object width="425" height="355" type="application/x-shockwave-flash" data="http://www.youtube.com/v/FpjyCE-R4Y4?fs=1&hl=en_US" id="obj"> \ <param name="movie" value="http://www.youtube.com/v/FpjyCE-R4Y4?fs=1&hl=en_US"/> \ <param name="allowFullScreen" value="true"/> \ <param name="allowScriptAccess" value="true"/> \ </object> \ }}} → 1290288742829535 |
---|---|
resolution: | → invalid |
status: | new → closed |
Thanks for the report, but this is not a jQuery bug. The <object>
code you are using is invalid, so IE6/7 use the inner <embed>
and drop the outer <object>
from the DOM. While this behaviour is technically incorrect, all you need to do is append before the <embed>
instead, or fix the HTML so it looks like this:
<object width="425" height="355" type="application/x-shockwave-flash" data="http://www.youtube.com/v/FpjyCE-R4Y4?fs=1&hl=en_US" id="obj"> <param name="movie" value="http://www.youtube.com/v/FpjyCE-R4Y4?fs=1&hl=en_US"/> <param name="allowFullScreen" value="true"/> <param name="allowScriptAccess" value="true"/> </object>