Skip to main content

Bug Tracker

Side navigation

#3003 closed bug (invalid)

Opened June 07, 2008 04:47PM UTC

Closed January 07, 2009 02:51AM UTC

error in explorer setting unsupported css properties via ready()

Reported by: lsole Owned by:
Priority: undecided Milestone: 1.3
Component: core Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:
Description

I've noticed Explorer (6,7) errors when jQuery tries to set an unsupported css property to an element via the ready() function (line 1121 char 4). It doesn't happen when the script is in the document body. I found this trying to set a "display:table" css property to an element, but it also happens with other unsupported properties.

Example markup to test this:

<html>

<head>

<script type="text/javascript" src="js/jquery-1.2.6.js"></script>

<script type="text/javascript">

$(function(){$('#test').css('display', 'table');}); // error!

</script>

</head>

<body>

<div id="test">hello world!</div>

<script type="text/javascript">

$('#test').css('display', 'table'); no error!

document.getElementById('test').style.display = 'table'; no error!

</script>

</body>

</html>

Attachments (0)
Change History (3)

Changed June 10, 2008 08:22PM UTC by flesler comment:1

What happens if you do that the non-jquery way inside the document ready ?

Does that error ?

Changed June 18, 2008 11:30AM UTC by lsole comment:2

Yes, it also errors. I've found out that it even errors using the typical onload handler, and not using jQuery at all. It must be some curious IE onload-related bug (on which also jQuery relies?), because it doesn't show up when the script is in the body.

You may want to close this bug report. It would be nice that jQuery would find a workaround for this, but this is another subject.

Thanks and keep up with this good job!

Changed January 07, 2009 02:51AM UTC by dmethvin comment:3

resolution: → invalid
status: newclosed

Closed per your request.