Bug Tracker

Modify

Ticket #3219 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

boolean argument to toggle functions

Reported by: dalangalma Owned by: flesler
Priority: minor Milestone: 1.3
Component: effects Version: 1.2.6
Keywords: Cc: dalangalma
Blocking: Blocked by:

Description

This is similar to #1681 but more general. I'd like it if all the toggle functions (toggle, toggleClass, slideToggle, etc) could take a boolean to say whether to show or hide them. That way you could replace code that was like:

if (hasErrors) {
  $('#errorPanel).show();
}
else {
  $('#errorPanel).hide();
}

it could just be:

$('#errorPanel').toggle(hasErrors);

Change History

comment:1 Changed 5 years ago by flesler

  • Owner set to flesler
  • Status changed from new to assigned

This seems like a valid enhancement, I'll take care of this.

comment:2 Changed 4 years ago by flesler

  • Cc dalangalma added
  • Status changed from assigned to closed
  • Resolution set to fixed

Added at [6000] and [6001].

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.