This documentation is currently being moved to github.

Please view or edit the documentation there, instead.

If you're looking for Fluid Project coordination, design, communication, etc, try the Fluid Project Wiki.

Skip to end of metadata
Go to start of metadata

fluid.findAncestor(element, test)

Finds the nearest ancestor of the element that passes the test.

File name: Fluid.js



(Element) DOM element


(Function) A function which takes an element as a parameter and returns true or false for some test.

Return Value


the nearest ancestor that passes the test

See Also


In this example, fluid.findAncestor() is used to find an ancestor of smallHeader that has a desired selector.

  • No labels