Ricky
Ricky

Reputation: 35843

JQuery :hidden doesn't work in IE8

With jquery 1.3.2, in IE7, $("tr.football:hidden").length returns 8, however, in IE8 it returns 0.

Did you ever met the same issue? How did you workaround this?

Thanks.

Upvotes: 4

Views: 1158

Answers (2)

Steve
Steve

Reputation: 50573

It looks like a bug, check the forum: jquery forum bug report

Upvotes: 5

jamesmortensen
jamesmortensen

Reputation: 34038

I would suggest upgrading to the latest version of JQuery 1.4.4. There are 4 other versions of JQuery that are ahead of the one you're running, and I'd hate to see you struggle to find a solution to a problem that may be fixed in the latest JQuery release.

Of course, if the problem still exists after upgrading, there are some other things you can try:

  • Make sure your HTML validates. JavaScript will sometimes have trouble parsing your HTML correctly if it doesn't meet the standards that the browsers were implemented in respect to.
  • See if you can find a workaround, such as using the style "display:none" selector or maybe binding an extra class on your hidden elements.

Here is a link to the Google Libraries API. You can link directly to the latest version of JQuery 1.4.4: http://code.google.com/apis/libraries/devguide.html#jquery

Upvotes: 2

Related Questions