JSFiddle - React, Tailwind, and code Playground
by jiggle
HTML
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.default.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.dataviz.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.mobile.all.min.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="http://cdn.kendostatic.com/2013.2.716/js/kendo.all.min.js"></script>
<div id="main" data-role="view">
<div id="container">
<div id="bar"><div>Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 </div>Page 2 Page 2 Page 2 Page 2Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 Page 2Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 Page 2 Page 2</div>
<div id="foo">Page 1</div>
</div>
<div style="background:red;height:1000px;top:250px;position:absolute"> <a id="test" data-role="button" data-click="flip">flip</a>
</div>
</div>
<script>
var reverse=true;
function flip(e) {
console.log('flip it');
if (reverse==true){
flipAnim.reverse();
reverse=false;
}else
{flipAnim.play();reverse=true;}
}
</script>
CSS
<style> #container {
position: relative;
width: 200px;
height: 200px;
}
#foo {
position: absolute;
width: 200px;
height: 200px;
background: blue;
}
#bar {
position: absolute;
width: 200px;
height: 200px;
background: red;
}
</style>
JavaScript
var app = new kendo.mobile.Application(document.body);
var flipAnim = kendo.fx($("#container")).flip("horizontal", $("#foo"), $("#bar"));
flipAnim.play();
// an alternative syntax would be
// kendo.fx($("#container")).flipHorizontal($("#foo"), $("#bar")).play();