]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
docs: add docs in magellan about `updateHistory` option 10833/head
authorNicolas Coden <nicolas@ncoden.fr>
Tue, 2 Jan 2018 08:27:46 +0000 (09:27 +0100)
committerNicolas Coden <nicolas@ncoden.fr>
Tue, 2 Jan 2018 08:27:46 +0000 (09:27 +0100)
docs/pages/magellan.md

index 0c683b7905a81e1b6c77832c0216f5054f522885..bd84393bb3979681d446fadbb60358a558d536b5 100644 (file)
@@ -86,3 +86,10 @@ This below example is a simplified version of the table of contents on the right
 </div>
 ```
 
+---
+
+## Browser history
+
+When the `data-deep-link` option is set to `true`, the active section of the magellan is recorded by adding a hash with the active magellan section ID to the browser URL. By default, magellan *replace* the browser history (using `history.replaceState()`).
+
+Modify this behavior by using attribute `data-update-history="true"` to *append* to the browser history (using `history.pushState()`). In the latter case the browser back button will track each section the magellan gone through (in most case, this is not recommended).