Bug Tracker

Ticket #4681 (closed bug: fixed)

Opened 6 years ago

Last modified 15 months ago

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

Description

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

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

Change History

Changed 6 years ago by vertigo

comment:1 Changed 4 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 4 years ago by SlexAxton

  • Priority changed from minor to low
  • Status changed from new to open
  • Milestone changed from 1.4 to 1.5

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

comment:3 Changed 4 years ago by anonymous

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

comment:4 Changed 4 years ago by timmywil

  • Status changed from open to closed
  • Resolution set to fixed
  • Milestone set to 1.next

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

comment:5 Changed 3 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 15 months 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.