Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 9 years ago

#4681 closed bug (fixed)

Hide/Toggle functions fail inside a hidden element

Reported by: vertigo Owned by:
Priority: low Milestone: 1.next
Component: effects Version: 1.3.2
Keywords: fade hide effects Cc:
Blocked by: Blocking:


Trying to use .fadeOut() on an img, which is inside a container div. When the container div is hidden, calling .fadeOut() on the img fails to hide it. Also happens with .toggle()

To test: extract example, load in browser. Click "Toggle Div" (div will hide). Click "Toggle Img". Click "Toggle Div" again (div will show). The img will still show, when it should be hidden.

Attachments (1)

hidetest.rar (21.1 KB) - added by vertigo 14 years ago.

Download all attachments as: .zip

Change History (7)

Changed 14 years ago by vertigo

Attachment: hidetest.rar added

comment:1 Changed 13 years ago by dobiatowski

I agree with vertigo, problem is still open.

in the link I posted code for testing, which show that .toggle() doesn't work for objects inside hidden parents. http://jsfiddle.net/kXctQ/

I hope you will fix it soon. Dobiatowski!

comment:2 Changed 12 years ago by SlexAxton

Milestone: 1.41.5
Priority: minorlow
Status: newopen

I can reproduce this in 1.4.3 and git. Marking as valid/open.

comment:3 Changed 12 years ago by anonymous

I just ran into this issue as well. It remains open.

comment:4 Changed 12 years ago by timmywil

Milestone: 1.next
Resolution: fixed
Status: openclosed

Having evaluated the test case again, it seems this has been fixed.

comment:5 Changed 11 years ago by anonymous

Using the jquery 1.7.2 this bug still appears to be a problem with the toggle() function.

comment:6 Changed 9 years ago by paulmz

I'm pretty sure I'm having the same problem. I can't get any children DIVs to show when the parent is initially hidden and changed to show using .toggle, .toggleClass, etc. I have tried initially hiding the parent DIV inline, in the CSS and in the jquery script. In all cases, the parent toggles correctly but the children DIVs will not show. The only way it functions properly is if the parent DIV is NOT hidden to start- then the toggle works to hide and show the parent and children DIVs.

In doing research, I found reference that jquery applies "display:none" to nested DIVs under a hidden parent DIV, but doesn't reverse it when the parent is toggled in any way. Please correct me if I'm wrong, but this certainly does sound like a jquery bug.

Note: See TracTickets for help on using tickets.