Created
April 12, 2012 23:06
-
-
Save johnvilsack/2371671 to your computer and use it in GitHub Desktop.
wtf
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> | |
<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