Skip to main content

Search and Top Navigation

#7943 closed bug (notabug)

Opened December 10, 2011 11:48AM UTC

Closed December 10, 2011 12:37PM UTC

the slideUp function does not work when parent container is not visible.

Reported by: tcarnell Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.core Version: 1.8.16
Keywords: Cc:
Blocked by: Blocking:
Description

Although interestingly, slidedown does seem to work.

An example of the problem is hosted here:

http://staging.femtoo.com/jquerytest

The fragments of code from the example above are from a 'wizard' style dialog system. The user can move forward or backwards through a number of mini-pages. Thus, when they arrive on the first page, the second and third pages are hidden. However, even though those second and third pages are hidden I still want to trigger the 'change()' events of certain ui controls so they establish the correct state, ready for when the user DOES navigate to the page. NB: when I say 'page' I am not talking about an HTTP request, simple a div that gets shown or hidden that contains content.

Now to the demo. If we examine the code, we will see that when jQuery loads, we fire the '$("#triggerCheckbox").change();' function. This causes the checkbox '.is(':checked')' to be evaluated and (because the checkbox is not initially checked) should 'slideUp' the hidden container div.

When we click the 'show content' button, we should expect that the #someContent div has 'slided up', but it is still visible.

I believe this is a bug and that is should not matter if the parent container is visible or not, the slideUp should, somehow result in the target content being hidden.

I have used this 'pattern' numerous times in the past and I can not figure out at exactly what version causes the problem. For example, it is working on Femtoo.com, which is currently using:

jquery-1.7.1.min.js

jquery-ui-1.7.2.custom.min.js

but I have tried this on the test page and I cant make it work, which is odd.

Attachments (0)
Change History (2)

Changed December 10, 2011 11:57AM UTC by tcarnell comment:1

My rather horrible workaround is, instead of this:

$("#someContent").slideUp();

do this:

$("#someContent").slideUp( function() {

$("#someContent").hide();

});

(which maybe jQuery could do for me...)

Changed December 10, 2011 12:37PM UTC by scottgonzalez comment:2

resolution: → invalid
status: newclosed

This is not related to jQuery UI.