Opened 11 years ago
Closed 11 years ago
#9693 closed bug (fixed)
Inconsistency of document and code for .toggleClass
Reported by: | anferneeg | Owned by: | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | attributes | Version: | 1.6.1 |
Keywords: | neededdocs | Cc: | |
Blocked by: | Blocking: |
Description
In document, it said
.toggleClass( function(index, class), [switch] )
But more precisely, the function should be something like function(index, class, switch).
Source code, https://github.com/jquery/jquery/blob/master/src/attributes.js
jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
and sample code: http://jsfiddle.net/slater/sDVfK/2/
Either document or code should be modified.
Change History (1)
comment:1 Changed 11 years ago by
Component: | unfiled → attributes |
---|---|
Keywords: | neededdocs added |
Priority: | undecided → low |
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Thank you! docs updated: http://api.jquery.com/toggleClass/