Bug Tracker

Opened 11 years ago

Closed 10 years ago

#4876 closed bug (fixed)

various documentation bugs

Reported by: davidflanagan Owned by:
Priority: minor Milestone:
Component: docs Version:
Keywords: Cc:
Blocked by: Blocking:


The Selectors page does not document ~= and |= for attributes

The not() and add() methods allow a jQuery object as an argument, but this is not explicitly stated in the documentation. They list Array<Element> but not jQuery

The offsetParent() method is listed in the Traversal section rather than in the CSS section with the other offset methods. I don't think it belongs in the Traversal section: it is the only method listed there that doesn't call pushStack, and the only one that operates only on this[0] rather than the full set of elements.

The closest() method is documented with its selector argument as optional, but I think it is actually required for this method.

The Callback section of the Variable Types page uses "scope" where it means "context". Twice, I think.

The Variable Types page defines a Selector type for selector strings. But the API documentation usually seems to call these Expressions. It seems to me that Selector would be a much more specific and clearer term.

The css() method accepts a function as its second argument, but this is undocumented.

Change History (6)

comment:1 Changed 11 years ago by joern

Fixed closest(): It had |arg0optional=false, which seems to be the same as =true, so removed it.

comment:2 Changed 11 years ago by joern

Fixed the scope/context issue.

comment:3 Changed 11 years ago by joern

I've updated the css() docs, though that probably needs improvements: http://docs.jquery.com/CSS/css

comment:4 Changed 11 years ago by joern

Added offsetParent() to the CSS page.

comment:5 Changed 11 years ago by paul.irish

I added a note about not/add taking a jQuery object.

I totally agree about renaming 'expression' to 'selectors' across all of the docs. Let's address that one separately as it's a big change.

I don't see evidence of css() taking a function, but maybe I'm missing that?

comment:6 Changed 10 years ago by john

Milestone: 1.4
Resolution: fixed
Status: newclosed
Version: 1.3.2
Note: See TracTickets for help on using tickets.