/clientsideinclude

Primary LanguageHTMLThe UnlicenseUnlicense

Client Side Include (CSI)

Uses JavaScript to unobtrusively fill an HTML element with the contents of another URL.

Usage

Include csi.js anywhere in your HTML...

<script src="csi.js" defer></script>

Put a URL in the data-include attribute to any element to have it filled with the HTML returned by the URL...

<p data-include="/path/to/more/content.html"></p>

Example

Code: https://github.com/jasoncartwright/clientsideinclude/blob/main/example.html

Preview: https://htmlpreview.github.io/?https://github.com/jasoncartwright/clientsideinclude/blob/main/example.html