Hide unstable items by default, provide checkbox for toggling

This commit is contained in:
Tim Schaub
2014-08-22 17:30:29 -06:00
parent ecaedff890
commit a8999f601b
3 changed files with 23 additions and 2 deletions

View File

@@ -52,4 +52,13 @@ $(function () {
$(window).on('resize', _onResize); $(window).on('resize', _onResize);
_onResize(); _onResize();
});
// show/hide unstable items
var unstable = $('.unstable');
var stabilityToggle = $('#stability-toggle');
stabilityToggle.change(function() {
unstable.toggle(!this.checked);
return false;
});
unstable.toggle(!stabilityToggle[0].checked);
});

View File

@@ -372,3 +372,12 @@ footer {
.main .readme table ul li { .main .readme table ul li {
margin-bottom: 0; margin-bottom: 0;
} }
.unstable {
display: none;
}
#stability {
color: white;
position: absolute;
top: 1em;
right: 8em;
}

View File

@@ -18,8 +18,11 @@
<div class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner"> <div class="navbar-inner">
<div class="container"> <div class="container">
<a class="brand" href="/"><img src="../resources/logo.png"> OpenLayers 3</a> <a class="brand" href="/"><img src="../resources/logo.png" width="40"> OpenLayers 3</a>
<a class="brand" href="index.html">API Documentation</a> <a class="brand" href="index.html">API Documentation</a>
<label id="stability">
<input type="checkbox" id="stability-toggle" checked> Stable Only
</label>
</div> </div>
</div> </div>
</div> </div>