From d10f96bc9b016cd59621b9c87993495573171652 Mon Sep 17 00:00:00 2001 From: "Brian P. Hogan" Date: Thu, 17 Nov 2011 10:14:46 -0600 Subject: [PATCH] made tabs work without JavaScript as this was a requirement for our accessibility guidelines. --- index.html | 19 +++++++++++++++++++ javascripts/tabs.js | 5 ++++- stylesheets/base.css | 1 - 3 files changed, 23 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 5c1487a..ec9af61 100644 --- a/index.html +++ b/index.html @@ -65,6 +65,25 @@

Docs & Support

The easiest way to really get started with Skeleton is to check out the full docs and info at www.getskeleton.com.. Skeleton is also open-source and has a project on git, so check that out if you want to report bugs or create a pull request. If you have any questions, thoughts, concerns or feedback, please don't hesitate to email me at hi@getskeleton.com.

+ +
+

Support for simple tabs

+ + + + +
diff --git a/javascripts/tabs.js b/javascripts/tabs.js index 8a74b10..3c4478c 100644 --- a/javascripts/tabs.js +++ b/javascripts/tabs.js @@ -12,9 +12,12 @@ $(document).ready(function() { /* Tabs Activiation ================================================== */ + // Use CSS to hide the tabs + $("ul.tabs-content > li").css("display", "none"); + $("ul.tabs-content > li.active").css("display", "block"); var tabs = $('ul.tabs'); - + tabs.each(function(i) { //Get all tabs diff --git a/stylesheets/base.css b/stylesheets/base.css index 9bd76f6..e316548 100644 --- a/stylesheets/base.css +++ b/stylesheets/base.css @@ -254,7 +254,6 @@ border-top-right-radius: 2px; } ul.tabs-content { margin: 0; display: block; } - ul.tabs-content > li { display:none; } ul.tabs-content > li.active { display: block; } /* Clearfixing tabs for beautiful stacking */