Mark ref as dialog via Javascript
Description
The following code shows how to mark ref as dialog via Javascript.
Example
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.6.4.js'></script>
<link rel="stylesheet" type="text/css"
href="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.css">
<script type='text/javascript'
src="http://code.jquery.com/mobile/1.0b1/jquery.mobile-1.0b1.min.js"></script>
</head><!-- w ww . java2s. c o m-->
<body>
<div data-role="page" id="page1">
<div data-role="content">
<a data-role="button" id="likeToPage2" href="#page2"
data-transition="slide">Go To Page2</a>
</div>
</div>
<div data-role="page" id="page2">
<div data-role="header">
<h1>This is dialog</h1>
</div>
<div data-role="content">
<a data-role="button" href="#page1">Go To Page1</a>
</div>
</div>
<script>
$('#likeToPage2').attr('data-rel','dialog');
</script>
</body>
</html>