]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
docs: improve deepLink options documentation for Accordion, Reveal and Tabs 11075/head
authorNicolas Coden <nicolas@ncoden.fr>
Sun, 18 Mar 2018 20:30:45 +0000 (21:30 +0100)
committerNicolas Coden <nicolas@ncoden.fr>
Sun, 18 Mar 2018 20:30:45 +0000 (21:30 +0100)
js/foundation.accordion.js
js/foundation.reveal.js
js/foundation.tabs.js

index 0d601aac3f53b9dbc5bf7db34684c4a0eab07525..b1e500c2a71706749035e2dbaf9db74be0a35d5f 100644 (file)
@@ -294,31 +294,29 @@ Accordion.defaults = {
    */
   allowAllClosed: false,
   /**
-   * Allows the window to scroll to content of pane specified by hash anchor
+   * Link the location hash to the open pane.
+   * Set the location hash when the opened pane changes, and open and scroll to the corresponding pane when the location changes.
    * @option
    * @type {boolean}
    * @default false
    */
   deepLink: false,
-
   /**
-   * Adjust the deep link scroll to make sure the top of the accordion panel is visible
+   * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the accordion panel is visible
    * @option
    * @type {boolean}
    * @default false
    */
   deepLinkSmudge: false,
-
   /**
-   * Animation time (ms) for the deep link adjustment
+   * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment
    * @option
    * @type {number}
    * @default 300
    */
   deepLinkSmudgeDelay: 300,
-
   /**
-   * Update the browser history with the open accordion
+   * If `deepLink` is enabled, update the browser history with the open accordion
    * @option
    * @type {boolean}
    * @default false
index c3a46427409255f00f8b25c01017f7b8c92b717d..f19b37e0eaad2afb0c1e587d279baa4b8bfbc3f2 100644 (file)
@@ -535,14 +535,15 @@ Reveal.defaults = {
    */
   resetOnClose: false,
   /**
-   * Allows the modal to alter the url on open/close, and allows the use of the `back` button to close modals. ALSO, allows a modal to auto-maniacally open on page load IF the hash === the modal's user-set id.
+   * Link the location hash to the modal.
+   * Set the location hash when the modal is opened/closed, and open/close the modal when the location changes.
    * @option
    * @type {boolean}
    * @default false
    */
   deepLink: false,
   /**
-   * Update the browser history with the open modal
+   * If `deepLink` is enabled, update the browser history with the open modal
    * @option
    * @default false
    */
index 8c19264fcc89f3ccc8a0fc50bfa872b4967f8f40..995bf8e87248c0566e81529a1c112d2f94e344bb 100644 (file)
@@ -398,7 +398,8 @@ class Tabs extends Plugin {
 
 Tabs.defaults = {
   /**
-   * Allows the window to scroll to content of pane specified by hash anchor
+   * Link the location hash to the active pane.
+   * Set the location hash when the active pane changes, and open the corresponding pane when the location changes.
    * @option
    * @type {boolean}
    * @default false
@@ -406,7 +407,7 @@ Tabs.defaults = {
   deepLink: false,
 
   /**
-   * Adjust the deep link scroll to make sure the top of the tab panel is visible
+   * If `deepLink` is enabled, adjust the deep link scroll to make sure the top of the tab panel is visible
    * @option
    * @type {boolean}
    * @default false
@@ -414,7 +415,7 @@ Tabs.defaults = {
   deepLinkSmudge: false,
 
   /**
-   * Animation time (ms) for the deep link adjustment
+   * If `deepLinkSmudge` is enabled, animation time (ms) for the deep link adjustment
    * @option
    * @type {number}
    * @default 300
@@ -422,7 +423,7 @@ Tabs.defaults = {
   deepLinkSmudgeDelay: 300,
 
   /**
-   * Update the browser history with the open tab
+   * If `deepLink` is enabled, update the browser history with the open tab
    * @option
    * @type {boolean}
    * @default false
@@ -430,7 +431,7 @@ Tabs.defaults = {
   updateHistory: false,
 
   /**
-   * Allows the window to scroll to content of active pane on load if set to true.
+   * Allows the window to scroll to content of active pane on load.
    * Not recommended if more than one tab panel per page.
    * @option
    * @type {boolean}