Bug Tracker

Modify

Ticket #5724 (closed bug: invalid)

Opened 3 years ago

Last modified 2 years ago

'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:
Blocking: Blocked by:

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

ie6_object_before.rtf Download (1.1 KB) - added by gittrac 3 years ago.
on I.E. 6 , failure to create <div> before <object> using '.before' manipulation

Change History

Changed 3 years ago by gittrac

on I.E. 6 , failure to create <div> before <object> using '.before' manipulation

comment:1 Changed 3 years ago by dmethvin

  • Keywords ie6 added
  • Component changed from unfiled to manipulation

comment:2 Changed 2 years ago by dmethvin

 http://jsfiddle.net/dmethvin/cp3Qh/

Worked for me in IE8; I didn't have IE6 to test so I'll leave it as new.

comment:3 Changed 2 years ago by jitter

 test case not a bug with before but with IE6 having problems with object/embed tags

comment:4 Changed 2 years ago by jitter

  • Priority changed from major to low
  • Version changed from 1.3.2 to 1.4.4
  • Milestone changed from 1.4 to 1.5

comment:5 Changed 2 years ago by snover

  • Status changed from new to closed
  • Resolution set to invalid

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&amp;hl=en_US" id="obj">
    <param name="movie" value="http://www.youtube.com/v/FpjyCE-R4Y4?fs=1&amp;hl=en_US"/>
    <param name="allowFullScreen" value="true"/>
    <param name="allowScriptAccess" value="true"/>
</object>
Last edited 2 years ago by snover (previous) (diff)

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.