Skip to content

genealogysystems/fs-traversal-relationship-display

Repository files navigation

fs-traversal-relationship-display

Generate an HTML display of an fs-traversal relationship path.

View the demo.

Usage

  1. Include the JavaScript and CSS on the page.

    <script src="fs-traversal-relationship-display.js"></script>
    <link rel="stylesheet" href="fs-traversal-relationship-display.css">
  2. Pass the result of FSTraversal.pathTo(id) directly into FSTraversalRelationshipDisplay to generate the HTML display.

    var path = traversal.pathTo(personId);
    var relationshipHTML = FSTraversalRelationshipDisplay(path);
  3. Add the HTML to the DOM.

  4. Optional: You may specify a language.

    FSTraversalRelationshipDisplay(path, 'es');

    Currently only English en and Spanish es are supported. Defaults to en.

Releases

No releases published

Packages

No packages published