Bug Tracker

Opened 10 years ago

Last modified 10 years ago

#9336 closed enhancement

:hidden doesn't check for opacity: 0 — at Version 6

Reported by: lonesomeday Owned by:
Priority: low Milestone: 1.7
Component: effects Version: 1.6.1
Keywords: needsreview, 1.7-discuss Cc:
Blocked by: Blocking:

Description (last modified by paul.irish)

The logical way to prepare an element to be faded in using fadeIn is by setting the opacity style to 0. However, invoking is(':hidden') on an element with opacity 0 returns false, unless hidden by display: none.

jsFiddle example

StackOverflow question

It would be useful if the :hidden filter checked the opacity setting.

Change History (6)

comment:1 Changed 10 years ago by Rick Waldron

Component: unfiledeffects
Keywords: needsreview added
Status: newopen

Technically, this is all correct - but I see the conundrum. Marking "needsreview" for further bike-shedding.

comment:2 Changed 10 years ago by john

Keywords: 1.7-discuss added

Nominating ticket for 1.7 discussion.

comment:3 Changed 10 years ago by Rick Waldron

Description: modified (diff)

+0, This needs discussion

comment:4 Changed 10 years ago by jaubourg

-1, It's exactly as documented. The element takes space and should be considered hidden.

comment:5 Changed 10 years ago by timmywil

-1, It is not "hidden" if visibility: hidden either.

comment:6 Changed 10 years ago by paul.irish

Description: modified (diff)

-1, that'd be more of an :invisible as the element still takes up space, just like with visibility:hidden

The dimensions == 0 check is expected by users nowadays.

Note: See TracTickets for help on using tickets.