Bug Tracker

Modify

Ticket #11252 (closed bug: fixed)

Opened 16 months ago

Last modified 13 months ago

:even and :odd selectors documentation does not specify which order is considered

Reported by: Chealer Owned by: Chealer
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

Description

The documentation for the :even and :odd selectors is very similar. :even's reads: Description: Selects even elements, zero-indexed. See also odd.

 http://api.jquery.com/even-selector/  http://api.jquery.com/odd-selector/

There is no explanation of what is called an "even element" or an "odd element" or of which index is referred to. The examples do not make it very clear. One possibility which would agree with the examples is that the order considered is the order of elements matched by the modified selector.

Change History

comment:1 Changed 16 months ago by dmethvin

  • Owner set to Chealer
  • Status changed from new to pending

I agree the current docs are sparse. Can you provide some specific words that would clarify the page in your mind?

comment:2 Changed 16 months ago by Chealer

  • Status changed from pending to new

If I'd know what the selectors do, I suppose I could. I see two likely possibilities which would work with the examples. The first is the one I described above. The second is that each element considers its own order, which is the order in the set of children of its parent (:odd-child, :even-child). But then not all elements have a parent.

comment:3 Changed 16 months ago by addyosmani

  • Keywords needsdocs added

comment:4 Changed 16 months ago by addyosmani

  • Status changed from new to open

comment:5 Changed 15 months ago by dmethvin

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

Docs updated, using a new Reusable called "Document Order".

comment:6 Changed 13 months ago by addyosmani

  • Keywords needsdocs removed

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.