Add ugly quick-nav

This commit is contained in:
Daniel Sinn
2015-12-22 23:31:26 -05:00
parent 061451653a
commit 8bc4466dbb
3 changed files with 24 additions and 0 deletions
+4
View File
@@ -7,6 +7,10 @@
</head>
<body>
<nav>
<ul id="navList"></ul>
</nav>
<h1>Keep Talking and Nobody Explodes</h1>
<section id="sectionWires">
+15
View File
@@ -80,6 +80,21 @@ h2 {
margin-top: 1em;
}
nav {
background-color: white;
border-left: 1px solid black;
border-top: 1px solid black;
position: fixed;
bottom: 0;
right: 0;
}
#navList {
line-height: 150%;
list-style-type: none;
margin: 0;
padding-left: 0.2em;
}
#sectionWires button {
border-color: black;
cursor: pointer;
+5
View File
@@ -26,6 +26,11 @@ $('.jsResetSection').on('click', function () {
ktane.resetInputs($(this).closest('section')).filter('[type="text"]').first().focus();
});
$('section').each(function () {
var $navList = $('#navList');
$navList.append('<li><a href="#' + this.id + '">' + $(this).find('h2').first().text() + '</a></li>');
});
(function () {
/**
* Wires