Created
July 10, 2012 17:04
-
-
Save dhavaln/3084731 to your computer and use it in GitHub Desktop.
Cordova 1.7 Remote Test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | |
<title>Insert title here</title> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"> | |
</script> | |
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script> | |
<script type="text/javascript"> | |
var serviceURL = 'http://salespump.pumpstationstudios.com/app/services/'; | |
var employees; | |
function getEmployeeList() { | |
$.getJSON(serviceURL + 'getemployees.php', function(data) { | |
$('#employeeList li').remove(); | |
employees = data.items; | |
$.each(employees, function(index, employee) { | |
$('#employeeList').append('<li><a href="employeedetails.html?id=' + employee.id + '">' + | |
'<img src="' + employee.image + '"/>' + | |
'<h4>' + employee.fullname + '</h4>' + | |
'<p>' + employee.title + '</p>' + | |
'<span class="ui-li-count">' + employee.reportCount + '</span></a></li>'); | |
$('#employeeList').listview('refresh'); | |
}); | |
}); | |
} | |
</script> | |
</head> | |
<body> | |
<div data-role="page" id="employeeListPage"> | |
<ul id="employeeList" data-role="listview"> | |
</ul> | |
</div> | |
</body> | |
<script type="text/javascript"> | |
$('#employeeListPage').bind('pageinit', function(event) { | |
getEmployeeList(); | |
}); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment