Prev gets the immediately preceding sibling of each element in the Selection. It returns a new Selection object containing the matched elements.
()
| 331 | // Prev gets the immediately preceding sibling of each element in the |
| 332 | // Selection. It returns a new Selection object containing the matched elements. |
| 333 | func (s *Selection) Prev() *Selection { |
| 334 | return pushStack(s, getSiblingNodes(s.Nodes, siblingPrev, nil, nil)) |
| 335 | } |
| 336 | |
| 337 | // PrevFiltered gets the immediately preceding sibling of each element in the |
| 338 | // Selection filtered by a selector. It returns a new Selection object |