Skip to content

Instantly share code, notes, and snippets.

@johnvilsack
Created April 12, 2012 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johnvilsack/2371671 to your computer and use it in GitHub Desktop.
Save johnvilsack/2371671 to your computer and use it in GitHub Desktop.
wtf
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0-rc.2/jquery.mobile-1.1.0-rc.2.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-rc.2/jquery.mobile-1.1.0-rc.2.js"></script>
</head>
<body>
<div data-role="page" id="container" data-theme="c">
<div data-role="header" data-theme="a">
<h1>Hello</h1>
</div>
<div data-role="content">
<input type="button" id="button" />
</div>
<div id="story"></div>
</div>
<script>
$("#container").on("pageshow",function(e) {
$("#story").html("<p>Hello There!</p>");
$("#button").on("click", function(e) {
$("#story").html("<p>Loading...</p>");
$.mobile.changePage("view.result.php", {
type: "post"
} );
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment