The next two class is empty to adjust the column width to accommodate the number of columns that might be added
$ ("Div>p"). Parent (). Not ($ (". Grid_2")). Filter ("Nth-child (" +lenth+ "n+1)") to select the 2nd column of each row, but the third column is selected, baffled
Using the Firbug query the element is unintentionally found under the elements of the Nodeindex (Nodeindex in the order of the same element) and parameter An+b calculated the same value, the original want to directly use the Nodeindex to select the 2nd column okay, but don't know how to do it.
Check the next Baidu inadvertently found Nth-child is also the use of Nodeindex Select the specific implementation of the following
Copy Code code as follows:
filters:{
such as $ ("input[name^= ' News ']") "<inputname=" Newsletter "/>"
Attr:function (Elem,match) {
VARRESULT=EXPR.ATTRHANDLE[MATCH[1]]? EXPR.ATTRHANDLE[MATCH[1]] (elem): elem[match[1]]| | Elem.getattribute (Match[1]), value=result+ "", type=match[2],check=match[4];
Returnresult==null?
type=== "!=":
type=== "="?
Value===check:
type=== "*="?
Value.indexof (check) >=0:
type=== "~="?
("+value+"). IndexOf (check) >=0:
!MATCH[4]?
Result
type=== "!="?
Value!=check:
type=== "^="?
Value.indexof (check) ===0:
type=== "$="?
Value.substr (value.length-check.length) ===check:
type=== "|="?
value===check| | Value.substr (0,check.length+1) ===check+ "-":
False
}
}
The original: Nth-child (AN+B) is chosen based on the Nodeindex value under the parent element of the element (that is, the child element is selected from the parent element of your current element) instead of the nth in the child element of the remaining element.
So I used. Not to filter out the first column does not make the second column of nodeindex=2 a "first column"