From d9193339e9a58907cd31b756b87b13787df8c429 Mon Sep 17 00:00:00 2001 From: mmikitka Date: Mon, 3 Mar 2014 12:37:28 -0500 Subject: [PATCH] Updated tabs documentation with deep linking feature --- doc/includes/tabs/examples_tabs_deep_linking.html | 13 +++++++++++++ doc/pages/components/tabs.html | 10 ++++++++++ 2 files changed, 23 insertions(+) create mode 100644 doc/includes/tabs/examples_tabs_deep_linking.html diff --git a/doc/includes/tabs/examples_tabs_deep_linking.html b/doc/includes/tabs/examples_tabs_deep_linking.html new file mode 100644 index 000000000..e4e364c12 --- /dev/null +++ b/doc/includes/tabs/examples_tabs_deep_linking.html @@ -0,0 +1,13 @@ +
+
Tab 1
+
Tab 2
+
+
+ + +
diff --git a/doc/pages/components/tabs.html b/doc/pages/components/tabs.html index ae01abfd3..ec2cbc642 100644 --- a/doc/pages/components/tabs.html +++ b/doc/pages/components/tabs.html @@ -61,6 +61,16 @@ You can create a group of vertical tabs using minimal markup. *** +### Deep linking to tabs or tab contents + +The tabs Foundation component can parse the location hash value and open the corresponding tab content pane. If the location hash maps to an element ID within a tab content pane, then the appropriate tab will become active and the browser window will scroll to the specified element. If you do not want to scroll to the specified element then set `data-options="scroll_to_content: false"`. + +In the following example, deep linking is enabled. If the location hash is `#tabs-deeplink-2` then the second tab will become active. If the location hash is `#tabs-deeplink-content-2` then the second tab will become active, and the browser will scroll to the paragraph tag with ID, tabs-deeplink-content-2. + + + +*** + ### Callbacks There are two ways to bind to callbacks in your tabs. -- 2.47.2