Opened 12 years ago
Closed 12 years ago
#10049 closed bug (invalid)
SlideToggle() keeps hidden elements as 'visible'
Reported by: | 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
Component: | unfiled → effects |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
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.