### Install foundation-docs via npm Source: https://github.com/foundation/foundation-docs/blob/master/README.md This codebase isn't on npm directly, but this Git repository can be referenced in a `package.json` for installation. ```json { "dependencies": { "foundation-docs": "foundation/foundation-docs" } } ``` -------------------------------- ### JavaScript Method: exampleFunction Usage Example Source: https://github.com/foundation/foundation-docs/blob/master/test/output/component.html This method provides an example of how to call a function on a Foundation-initialized element. It is typically used for demonstrating basic component interactions. ```JavaScript $('#element').foundation('exampleFunction'); ``` -------------------------------- ### JavaScript Method: sinceFunction Usage Example Source: https://github.com/foundation/foundation-docs/blob/master/test/output/component.html This function was introduced in a specific version of the library. It demonstrates a simple method call on a Foundation-initialized element. ```JavaScript $('#element').foundation('sinceFunction'); ``` -------------------------------- ### Link foundation-docs for local testing with Foundation frameworks Source: https://github.com/foundation/foundation-docs/blob/master/README.md To test `foundation-docs` with an actual framework's documentation, you can link the folders using `npm link`. This assumes `foundation-sites` and `foundation-docs` are in the same parent directory. ```bash npm link ../foundation-docs ``` -------------------------------- ### JavaScript Component Initialization Requirements Source: https://github.com/foundation/foundation-docs/blob/master/test/output/index.html Outlines the necessary JavaScript files and utility libraries required to use the component plugin. ```APIDOC Initialization: Required Files: - component.js - foundation.core.js Required Utility Libraries: - foundation.core.js ``` -------------------------------- ### JavaScript Class: Foundation.Plugin Constructor and Parameters Source: https://github.com/foundation/foundation-docs/blob/master/test/output/component.html This class constructor initializes new instances of the Foundation plugin. It accepts an element and options, and fires the `init.zf.event:plugin` event upon initialization. ```JavaScript var elem = new Foundation.Plugin(element, options); ``` ```APIDOC Foundation.Plugin: Fires Events: init.zf.event:plugin Parameters: param1: Type: object Description: This is a parameter. param2: Type: string Description: This is an optional parameter. param3: Type: boolean Description: This is an optional parameter with a default value. param4: Type: string Description: This is a parameter that accepts multiple types. ``` -------------------------------- ### Basic HTML Button Structure Source: https://github.com/foundation/foundation-docs/blob/master/test/output/index.html Demonstrates the basic HTML structure for a button element with a 'button' class. ```HTML