Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 1001 Bytes

File metadata and controls

30 lines (20 loc) · 1001 Bytes

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.