-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
44 lines (39 loc) · 1.96 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<html class="ui-mobile"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Automation Bookstore Demo</title>
<link rel="stylesheet" href="css/jquery.css">
<link rel="stylesheet" href="css/listview-grid.css">
<script src="js/jquery.js"></script>
<script src="js/jquery_002.js"></script>
<script src="js/products.js"></script>
</head>
<body class="ui-mobile-viewport ui-overlay-b">
<div data-role="page" data-theme="b" id="demo-page" class="my-page ui-page ui-page-theme-b ui-page-active" data-url="demo-page" tabindex="0" style="min-height: 930px;">
<div data-role="header" role="banner" class="ui-header ui-bar-inherit">
<h1 id="page-title" class="ui-title" role="heading" aria-level="1">Automation Bookstore - Test 2 Update title</h1>
</div><!-- /header -->
<div role="main" class="ui-content">
<form class="ui-filterable">
<input id="searchBar" data-type="search" placeholder="Filter books.." class="ui-focus">
</form>
<ul id="productList" data-role="listview" data-filter="true" data-input="#searchBar">
<script>
var products = getProducts();
$.each(products, function () {
$.each(this, function (index, product) {
var list = document.getElementById('productList');
var listItem = document.createElement('li');
listItem.setAttribute('id', "pid" + product.id);
listItem.innerHTML = "<a href='#'><img id='pid" + product.id + "_thumb' src='" + product.thumb + "' class='ui-li-thumb'><h2 id='pid" + product.id + "_title'>" + product.name + "</h2><p id='pid" + product.id + "_author'>" + product.author + "</p><p class='ui-li-aside' id='pid" + product.id + "_price'>$" + product.price +"</p></a>";
list.appendChild(listItem);
});
});
</script>
</ul>
</div><!-- /content -->
</div><!-- /page -->
</body>
</html>