Skip to main content

Bug Tracker

Side navigation

#11210 closed bug (invalid)

Opened January 23, 2012 04:04PM UTC

Closed January 24, 2012 11:29AM UTC

Last modified March 10, 2012 01:28AM UTC

toggleClass documentation

Reported by: guettli Owned by: guettli
Priority: low Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:
Description

The jquery toggleClass documentation needs to be updated.

http://api.jquery.com/toggleClass/

Please advice the user to use a Boolean for the "switch" parameter, since this is required by toggleClass implementation of jquery-ui

Related bug in jquery-ui (there the swich paramter (called "force" in the source, is even not documented):

http://bugs.jqueryui.com/ticket/8049

Attachments (0)
Change History (3)

Changed January 23, 2012 04:10PM UTC by dmethvin comment:1

owner: → guettli
status: newpending

It already says this, what is unclear?

A Boolean (not just truthy/falsy) value to determine whether the class should be added or removed.

jQuery UI extensions are covered in the jQuery UI docs, not in the core docs.

Changed January 24, 2012 08:59AM UTC by guettli comment:2

status: pendingnew

jquery docs says "... (not just truthy/falsy)" and jquery-ui only supports Boolean. If it is not a boolean, jquery-ui tries to use this value as animation.

Please use something like this instead of "(not just truthy/falsy)":

"since jquery-ui overwrites this method, it is recommended to use a boolean object."

jquery-ui source of toggleClass:

https://github.com/jquery/jquery-ui/blob/master/ui/jquery.effects.core.js#LC310

I know that jquery-ui is not part of jquery. But many people use it.

Changed January 24, 2012 11:29AM UTC by addyosmani comment:3

_comment0: Thanks for submitting a ticket to the jQuery bug tracker. As Dave as mentioned earlier, extensions to jQuery UI are covered in their docs http://jqueryui.com/demos/. To request any changes to these docs, please file a ticket here as this tracker is for core issues only: http://bugs.jqueryui.com/1327405765865351
priority: undecidedlow
resolution: → invalid
status: newclosed

Thanks for submitting a ticket to the jQuery bug tracker. As Dave has mentioned earlier, extensions to jQuery UI are covered in their docs http://jqueryui.com/demos/. To request any changes to these docs, please file a ticket here as this tracker is for core issues only: http://bugs.jqueryui.com/