2
* Copyright (C) 2013 Adnane Belmadiaf <daker@ubuntu.com>
3
* License granted by Canonical Limited
5
* This file is part of ubuntu-html5-theme.
7
* This package is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU Lesser General Public License as
9
* published by the Free Software Foundation; either version 3 of the
11
* (at your option) any later version.
13
* This package is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
18
* You should have received a copy of the GNU Lesser General Public
19
* License along with this program. If not, see
20
* <http://www.gnu.org/licenses/>.
24
* An Ubuntu Header wraps Tabs. Together they provide the main navigation widget at the top of an Ubuntu HTML5 app.
26
Declare the Header and its Tabs in HTML as a direct child of the top level Page as a sibling to the <em>content</em> div.
27
######Contained list provides Page navigation
28
A contained unordered list has list items, each of which has an anchor (<a>) whose <em>href</em> attribute is a hash char ("#") followed by a Page ID. Clicking the Header/Tabs allows the user to navigate to the Pages identified by these IDs.
35
<div data-role="page">
36
<header data-role="header" id="headerID">
37
<div class="tabs-inner">
39
<li class="active" data-role="tab">
40
<a href="#main">Main</a>
43
<a href="#page2">Two</a>
48
<div data-role="content">
55
var header = UI.header("headerID");
57
var Header= function (id) {
63
* Returns the DOM element associated with the id this widget is bind to.
66
var myheader = UI.header("headerid").element();
68
element: function () {
69
return document.getElementById(this.id);