Side navigation
#11821 closed bug (worksforme)
Opened May 26, 2012 07:07PM UTC
Closed May 26, 2012 07:23PM UTC
Last modified June 10, 2012 05:04PM UTC
slideUp doesn't work in display:none parent
Reported by: | javiergarmon@gmail.com | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | effects | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If you want to apply a slideUp effect to an element, the parent can't be hidden.
I suppose that this is a bug, cause slideDown() works in this circumstances.
Tested in Firefox 12 and Chrome 19
It's very simple to simulate:
<div id="parent" class="display:none">
<p>Hello world</p>
</div>
<script>
$('p','#parent').slideUp(200);
setTimeout(function(){
$('#parent').show();
},1000);
</script>
Attachments (0)
Change History (3)
Changed May 26, 2012 07:23PM UTC by comment:1
_comment0: | Works as intended. You slideUp the <p> and then try to show the parent, which will obviously show nothing since the <p> is still hidden. You can do $('#parent, p').show(); to make both visible. → 1338060417117558 |
---|---|
component: | unfiled → effects |
priority: | undecided → low |
resolution: | → worksforme |
status: | new → closed |
Changed June 08, 2012 11:15AM UTC by comment:2
I can't confirm that this works and have set up a jsFiddle test case as suggested: http://jsfiddle.net/zhrgK/
The following works:
1. Slide up p
2. Slide up container
3. Slide down p
4. Slide down container
> p are visible
The following does NOT work (Safari 5.1.7 on Mac):
1. Slide up container
2. Slide up p
3. Slide down container
> p is still visible though it was slider up when the container was up, too.
So in my opinion this is still an open bug.
Works as intended. You slideUp the <p> and then try to show the parent, which will obviously show nothing since the <p> is still hidden. You can do $('#parent, p').show(); to make both visible.
Oh, and you also got the HTML wrong, class="display:none" is invalid.
The next time please submit the bug with a JSfiddle testcase like instructed in the red box.