Skip to content

Navigation

Imaobong Eyoma edited this page Jun 12, 2015 · 1 revision

Introduction

Adding navigation to your application is a priority because this decides what pages you would like to navigate through your app.

Our sample has three tabs - Forms, Reports and Team Members which looks like this:

http://imgur.com/Sqglo5p.png

Backend

To add navigation to your app you need a html which looks like this:

http://imgur.com/q7eR662.png

To add navigation to your homepage, we need to add nav control to your homepage (forms.html) function: The code below has to be added inside the function between the script tags.

quickforms.loadNav('nav.html','nav');

The nav.html is the file you are calling for the navigation and you are giving it a name as nav which can be called under a division in the form(see below). To add to the above you also need to call the below piece before we define the content for the respective page.

<div data-role="header"><h1>HomePage</h1></div>
<div id = "nav"></div>
<div data-role="content">

The nav is defined between the header and the content for a page. This is the nav you defined in the function above.

Clone this wiki locally