Bug Tracker

Modify

Ticket #5962 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

Missing a "(" in the example

Reported by: liwen Owned by:
Priority: minor Milestone: 1.4.2
Component: unfiled Version: 1.4.1
Keywords: Cc:
Blocking: Blocked by:

Description

Hi,

The example for .toggleClass( function(index, class), [ switch ] ) in api:

$('div.foo').toggleClass(function() {

if ($(this).parent().is('.bar') {

return 'happy';

} else {

return 'sad';

}

});

I think the ")" after the code "('.bar')" is missing.

Change History

comment:1 Changed 3 years ago by dmethvin

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

Fixed, thanks!

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.