Bug Tracker

Modify

Ticket #2945 (closed bug: worksforme)

Opened 5 years ago

Last modified 2 years ago

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

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

comment:1 Changed 5 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 5 years ago by Markus.Staab

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

comment:3 Changed 5 years ago by flesler

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

comment:4 Changed 3 years ago by herr.schuessler

  • Status changed from closed to reopened
  • Resolution invalid deleted

comment:5 Changed 3 years ago by dmethvin

  • Component changed from core to css

comment:6 Changed 3 years ago by snover

  • Status changed from reopened to closed
  • Resolution set to worksforme

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

comment:7 Changed 2 years ago by jitter

  • Priority changed from major to low
  • Version changed from 1.2.5 to 1.4.2
  • Milestone changed from 1.3 to 1.4.3

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

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.