Reputation: 51
My navbar simply does not work. It does not show up at the screen, I don't know what I'm doing wrong!
I'm doing a mobile app using JQuery Mobile and PhoneGap.
Bellow you will find all my index.html file with all the all stuff I am referencing.
I'm using the phonegap Cli(command line) and I'm testing in a browser for now.
Code bellow:
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="msapplication-tap-highlight" content="no" />
<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/jquery.mobile-1.4.5.min.css" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<link rel="stylesheet" type="text/css" href="css/mycss.css" />
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/jquery-2.2.1.js"></script>
<script type="text/javascript" src="js/jquery.mobile-1.4.5.min.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/myjs.js"></script>
<!--<script type="text/javascript">
//app.initialize();
xyz.initialize();
</script>-->
<title>xyz</title>
</head>
<body>
<div data-hole="page" id="Page1">
<div data-hole="header" data-position="fixed">
<h1>xyz</h1>
<div data-hole="navbar">
<ul>
<li><a href="#index" data-icon="home">Home</a>
<li><a href="#contacts" data-icon="search">Contacts</a>
<li><a href="#events" data-icon="info">Events</a>
<li><a href="#news" data-icon="grid">News</a>
</ul>
</div>
</div>
<div data-hole="content">
<button onclick="showPopup()">Show Popup</button>
</div>
<div data-hole="footer">
My Footer
</div>
</div>
<!--<div class="app">
<h1>PhoneGap</h1>
<div id="deviceready" class="blink">
<p class="event listening">Connecting to Device</p>
<p class="event received">Device is Ready</p>
</div>
</div>-->
<!--<div class="xyz">
<div data-hole="footer">
<div data-hole="navbar">
<ul>
<li><a href="#" data-icon="grid">Summary</a></li>
<li><a href="#" data-icon="star" class="ui-btn-active">Favs</a></li>
<li><a href="#" data-icon="gear">Setup</a></li>
</ul>
</div>
</div>
</div>-->
</body>
</html>
Upvotes: 0
Views: 147
Reputation: 3802
There is mistake in your code it is data-role
and not data-hole.
HTML:
<div data-role="page" id="Page1">
<div data-role="header" data-position="fixed">
<h1>xyz</h1>
<div data-role="navbar">
<ul>
<li><a href="#index" data-icon="home">Home</a>
<li><a href="#contacts" data-icon="search">Contacts</a>
<li><a href="#events" data-icon="info">Events</a>
<li><a href="#news" data-icon="grid">News</a>
</ul>
</div>
</div>
<div data-role="content">
<button onclick="showPopup()">Show Popup</button>
</div>
<div data-role="footer">
My Footer
</div>
</div>
Upvotes: 1