Skip to content
Browse files

added tab detection from url hash

  • Loading branch information...
1 parent bc5805b commit 2f9d5d82588a3e91fddb4da9e6a295b60c4798cb @chrismatthieu chrismatthieu committed Dec 17, 2011
Showing with 15 additions and 2 deletions.
  1. +15 −2 api.html
View
17 api.html
@@ -46,6 +46,19 @@
<body>
+ <script>
+
+ $(document).ready(function() {
+ var hash = window.location.hash.substring(1);
+ if (hash == "rest") {
+ $('#restli').addClass("active");
+ $('#clili').removeClass("active");
+ $('#cli').removeClass("active");
+ $('#rest').addClass("active");
+ }
+ });
+ </script>
+
<div class="topbar">
<div class="fill">
<div class="container">
@@ -74,8 +87,8 @@
</p>
<ul class="tabs" data-tabs="tabs">
- <li class="active"><a href="#cli">Command Line Interface (CLI)</a></li>
- <li><a href="#rest">REST API</a></li>
+ <li class="active" id="clili"><a href="#cli">Command Line Interface (CLI)</a></li>
+ <li id="restli"><a href="#rest">REST API</a></li>
</ul>
<div id="my-tab-content" class="tab-content">

0 comments on commit 2f9d5d8

Please sign in to comment.
Something went wrong with that request. Please try again.