Bug Tracker

Modify

Ticket #11779 (closed bug: invalid)

Opened 12 months ago

Last modified 12 months ago

toggle() interferes with text of $(this).

Reported by: sagar.patil8890@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

$('<div>', {

id : 'specialButton', text : 'Hide!', click : function() {

$("#headingTypes").toggle();

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

$(this).text('Hide!');

} else {

$(this).text('Show!');

}

}

}).insertBefore('#headingTypes');

If we use the above code, the output is as expected: the sections with id headingTypes toggle and the corresponding text is shown (either Hide! or Show!); however the moment we introduce the 'slow' argument to the toggle function, the text doesn't change, i.e. it remains Hide! throughout.

Change History

comment:1 Changed 12 months ago by dmethvin

  • Status changed from new to closed
  • Resolution set to invalid

Please ask for help on a forum or StackOverflow.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.