Show popup via Javascript
Description
The following code shows how to show popup via Javascript.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.8.3.js'></script>
<link rel="stylesheet" type="text/css"
href="http://jquerymobile.com/demos/1.2.0/css/themes/default/jquery.mobile-1.2.0.css">
<script type='text/javascript'
src="http://jquerymobile.com/demos/1.2.0/js/jquery.mobile-1.2.0.js"></script>
<script type='text/javascript'>
$("#myPage").live("pageshow", function(event, ui){
$("#myPopup").popup("open");
});<!-- w ww . j a v a 2s . c o m-->
</script>
</head>
<body>
<div data-role="page" id="myPage">
<div data-role="content">Test</div>
<div data-role="popup" id="myPopup">Popup test</div>
</div>
</body>
</html>