Showing posts with label SwapView. Show all posts
Showing posts with label SwapView. Show all posts

Monday, 16 April 2012

Dojo Mobile Swap View Example

Dojo Mobile SwapView Demo Sample Example
Demostrates the Basic Example of how to code 3 Swap Views and add contents to it with Dojo 1.7 or higher

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no"/>
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>Sonata Software - Swap View Example</title>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js" data-dojo-config="async: true"></script>
<script>

require(["dojox/mobile/parser",
"dojox/mobile",
"dojox/mobile/Heading",
"dojox/mobile/deviceTheme",
"dojox/mobile/SwapView",
"dojox/mobile/RoundRect"
],
function(parser) {
parser.parse();
});

</script>
</head>
<body>
<div data-dojo-type="dojox.mobile.SwapView" >
<h1 data-dojo-type="dojox.mobile.Heading">View 1</h1>
<div data-dojo-type="dojox.mobile.RoundRect">
Swipe the screen left or right to flip between the views.
</div>
</div>
<div data-dojo-type="dojox.mobile.SwapView" >
<h1 data-dojo-type="dojox.mobile.Heading">View 2</h1>
<div data-dojo-type="dojox.mobile.RoundRect">
Swipe the screen left or right to flip between the views.
</div>
</div>
<div data-dojo-type="dojox.mobile.SwapView" >
<h1 data-dojo-type="dojox.mobile.Heading">View 3</h1>
<div data-dojo-type="dojox.mobile.RoundRect">
Swipe the screen left or right to flip between the views.
</div>
</div>

</body>
</html>