iUI No Navbar on home screen
based on Hello World iUI Sample
HTML
<link rel="stylesheet" href="http://iui.googlecode.com/git/web-app/iui/iui.css">
<link rel="stylesheet" href="http://iui.googlecode.com/git/web-app/iui/t/default/default-theme.css">
<script src="http://iui.googlecode.com/git/web-app/iui/iui.js"></script>
<div class="toolbar hidenavbar">
<h1 id="pageTitle"></h1>
<a id="backButton" class="button" href="#"></a>
</div>
<div title="Hello" id="home" selected="true">
<h1>Welcome!</h1>
<a href="#helloworld">Continue...</a>
</div>
<div title="World" id="helloworld" class="panel">
<h2>Hello World!</h2>
</div>
CSS
#home {
top: 0px;
}
.hidenavbar {
display: none;
}
JavaScript
(function() {
addEventListener("DOMContentLoaded", function(event)
{
var home = document.getElementById('home');
home.addEventListener('focus', hideNavbar, false);
home.addEventListener('blur', showNavbar, false);
}, false);
function hideNavbar(e) {
var navbar = document.querySelector(".toolbar");
iui.addClass(navbar, 'hidenavbar');
}
function showNavbar(e) {
var navbar = document.querySelector(".toolbar");
iui.removeClass(navbar, 'hidenavbar');
}
})();