From 74f2bd2862c104ff704eddd4a73856d00f4bad3b Mon Sep 17 00:00:00 2001 From: Michael Termer Date: Sun, 4 Nov 2018 16:14:06 -0500 Subject: [PATCH] instructions for defaultElement --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 7ba0a6f..8cbb0bc 100644 --- a/README.md +++ b/README.md @@ -8,5 +8,12 @@ Basically just loads pages without reloading the page. Place all files in your website's root, and make sure all paths point to index.html. Then, place all your webpages in pages/, and specify the routes for them in routes.ini. +By default, when a document is loaded, the element that gets replaced with the loaded content is the body. You can change which element gets its content replaced by setting `defaultElement` to a DOM element. For example, place the following code at the bottom of the document body to change the content of the first `

` element, instead of the `` element. +```html + +``` + ## How lightweight is it? A lot more lightweight than React.