Commit 32bad9bdbe7aefe2fb67e3e32f89ba7fa08f23d5
1 parent
71b34f50
Added navbar toggle on small screens
Not really a navbar toggle, just scrolls up. That would be a mess if it was a real one, I don't want't to go into it.
Showing
3 changed files
with
16 additions
and
0 deletions
Show diff stats
css/crep.css
js/crep.js
... | ... | @@ -108,6 +108,11 @@ $(document).ready(function () { |
108 | 108 | loc: current |
109 | 109 | }, document.title, current) |
110 | 110 | window.onpopstate = historyChange |
111 | + $('.navbar-fixed-top .navbar-toggle').click(function () { | |
112 | + $(document.body).animate({ | |
113 | + scrollTop: 0 | |
114 | + }) | |
115 | + }) | |
111 | 116 | }) |
112 | 117 | |
113 | 118 | function initializeMap() { | ... | ... |
topnavbar.php
... | ... | @@ -6,6 +6,12 @@ |
6 | 6 | <span class="hidden-xs">Coupe de Robotique des Ecoles Primaires</span> |
7 | 7 | <span class="visible-xs"><img src="img/logo.png" height="20" /></span> |
8 | 8 | </a> |
9 | + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> | |
10 | + <span class="sr-only">Show menu</span> | |
11 | + <span class="icon-bar"></span> | |
12 | + <span class="icon-bar"></span> | |
13 | + <span class="icon-bar"></span> | |
14 | + </button> | |
9 | 15 | </div> |
10 | 16 | <div class="collapse navbar-collapse" style="margin-right: 10px;"> |
11 | 17 | <p class="navbar-text navbar-right"> | ... | ... |