This documentation refers to an UNRELEASED version of Infusion.
View this page in the latest stable release documentation, or visit the latest release documentation home.
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