Skip to main content

Bug Tracker

Side navigation

#10049 closed bug (invalid)

Opened August 14, 2011 06:32PM UTC

Closed August 14, 2011 07:26PM UTC

SlideToggle() keeps hidden elements as 'visible'

Reported by: ialbd@yahoo.com Owned by:
Priority: low Milestone: None
Component: effects Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

$('#button123').click(function() {

$('#div123').slideToggle();

if ($('#div123').is(':visible')) {

$(this).val('Hide');

} else {

$(this).val('Show');

}

The button value will only change to 'Hide' when the div is hidden, but wont change back to 'Show'.

There was a similar bug for toggle(), and that was fixed and toggle() works fine.

Attachments (0)
Change History (1)

Changed August 14, 2011 07:26PM UTC by timmywil comment:1

component: unfiledeffects
priority: undecidedlow
resolution: → invalid
status: newclosed

Seems to work fine: http://jsfiddle.net/TNwJq/

.slideToggle() defaults to a timed animation, which means it is asynchronous unlike .toggle() when passed no arguments.