Modify ↓
Ticket #5962 (closed bug: fixed)
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
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Fixed, thanks!