Bug Tracker

Opened 12 years ago

Closed 12 years ago

#10049 closed bug (invalid)

SlideToggle() keeps hidden elements as 'visible'

Reported by: ialbd@… 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.

Change History (1)

comment:1 Changed 12 years ago by Timmy Willison

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.

Note: See TracTickets for help on using tickets.