jodd.lagarto.csselly.selector
Class PseudoFunction.NTH_CHILD

java.lang.Object
  extended by jodd.lagarto.csselly.selector.PseudoFunction
      extended by jodd.lagarto.csselly.selector.PseudoFunction.NTH_CHILD
Enclosing class:
PseudoFunction

public static class PseudoFunction.NTH_CHILD
extends PseudoFunction

The :nth-child(an+b) pseudo-class notation represents an element that has an+b-1 siblings before it in the document tree, for any positive integer or zero value of n, and has a parent element. For values of a and b greater than zero, this effectively divides the element's children into groups of a elements (the last group taking the remainder), and selecting the bth element of each group. For example, this allows the selectors to address every other row in a table, and could be used to alternate the color of paragraph text in a cycle of four. The a and b values must be integers (positive, negative, or zero). The index of the first child of an element is 1.


Nested Class Summary
 
Nested classes/interfaces inherited from class jodd.lagarto.csselly.selector.PseudoFunction
PseudoFunction.EQ, PseudoFunction.GT, PseudoFunction.LT, PseudoFunction.NTH_CHILD, PseudoFunction.NTH_LAST_CHILD, PseudoFunction.NTH_LAST_OF_TYPE, PseudoFunction.NTH_OF_TYPE
 
Constructor Summary
PseudoFunction.NTH_CHILD()
           
 
Method Summary
 boolean match(Node node, java.lang.String expression)
          Matches node using provided expression.
 
Methods inherited from class jodd.lagarto.csselly.selector.PseudoFunction
getPseudoFunctionName, match
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PseudoFunction.NTH_CHILD

public PseudoFunction.NTH_CHILD()
Method Detail

match

public boolean match(Node node,
                     java.lang.String expression)
Description copied from class: PseudoFunction
Matches node using provided expression.

Specified by:
match in class PseudoFunction


Copyright © 2003-2011 Jodd Team