Bug Tracker

Opened 12 years ago

Closed 9 years ago

Last modified 9 years ago

#2945 closed bug (worksforme)

Setting "z-index: auto" in IE6 gives a type mismatch error

Reported by: adrian Owned by:
Priority: low Milestone: 1.4.3
Component: css Version: 1.4.2
Keywords: ie6, z-index Cc:
Blocked by: Blocking:

Description

Html:

<a href="#">click me</a>

Javascript:

$('a').click(
  function () {
   $(this).css({'z-index':'auto'});
   }
);

Onclick the javascript will try to give z-index: auto but in IE6 i receive a type mismatch error (debugger sends me to line 1120 - jquery 1.2.6)

Setting a number instead of "auto" value will work proper and no errors in IE6.

Demo: http://jquerybox.com/jquery/zindex/

Change History (7)

comment:1 Changed 12 years ago by Markus.Staab

shouldn't it be

$('a').click(
  function () {
   $(this).css({z-index:'auto'});
   }
);

without the quotes on z-index?

comment:2 Changed 12 years ago by Markus.Staab

oh no, because of the - you need the '. please ignore my post.

comment:3 Changed 12 years ago by flesler

Resolution: invalid
Status: newclosed

comment:4 Changed 10 years ago by herr.schuessler

Resolution: invalid
Status: closedreopened

comment:5 Changed 9 years ago by dmethvin

Component: corecss

comment:6 Changed 9 years ago by snover

Resolution: worksforme
Status: reopenedclosed

Setting CSS values that IE does not understand no longer throws errors.

comment:7 Changed 9 years ago by jitter

Milestone: 1.31.4.3
Priority: majorlow
Version: 1.2.51.4.2

Fixed since 1.4.3 -> #5509 For a test case see http://bugs.jquery.com/ticket/6525#comment:4

Note: See TracTickets for help on using tickets.