Kendo UI Mobile base
HTML
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.229/styles/kendo.mobile.all.min.css">
<script src="http://cdn.kendostatic.com/2012.1.515/js/kendo.all.min.js"></script>
<div data-role="view" id="settings" data-layout="commonLayout" >
<input type="text" id="name" name="name"/><a data-role="button" data-click="loginClick">Login</a>
</div>
<div data-role="view" id="favorites" data-layout="commonLayout" data-show="loginClick">
Featured
</div>
<div data-role="layout" data-id="commonLayout">
<footer data-role="footer">
<div data-role="tabstrip">
<a href="#favorites" data-icon="favorites">Favorites</a>
<a href="#settings" data-icon="settings">Setting</a>
</div>
</footer>
</div>
JavaScript
var app = new kendo.mobile.Application($(document.body), { initial: "settings" });
function loginClick(e){
var nameValue = document.getElementById("name").value;
$.ajax({
//using jsfiddle echo service to simulate JSON endpoint
url: "/echo/json/",
dataType: "json",
type: "POST",
data: {
// /echo/json/ echoes the JSON which you pass as an argument
json: JSON.stringify({ name: nameValue })
},
success: function(response) {
if (response.name == "myName"){
app.navigate("#favorites");}
else {
alert("Invalid username")
}
}
})
}