Kendo Mobile Drawer widget - Hide in a specific view
by kendomobile
HTML
<link rel="stylesheet" href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.mobile.all.min.css">
<script src="http://cdn.kendostatic.com/2013.2.716/js/kendo.all.min.js"></script>
<!-- Demo created for the book: Building Mobile Applications Using Kendo UI Mobile and ASP.NET Web API.
http://www.packtpub.com/building-mobile-applications-with-kendoui-html5/book -->
<div data-role="drawer" id="right-drawer"
data-position="right" data-before-show="onBeforeShow">
<ul data-role="listview" data-type="group">
<li>Menu
<ul>
<li data-icon="camera"><a href="#view1">Take Photo </a>
</li>
<li data-icon="globe"><a href="#view2">Browse </a>
</li>
</ul>
</li>
</ul>
</div>
<div data-role="view" id="view1">
<div>
Swipe from right to left to
view the Drawer widget
</div>
</div>
<div data-role="view" id="view2">
<div>
Browse view in which Drawer is <b>disabled</b>.
</div>
</div>
JavaScript
var app = new kendo.mobile.Application(document.body, {
skin: 'flat'
});
function onBeforeShow(e) {
//check for view id to pevent
//display of Drawer
if (app.view().id == "#view2") {
e.preventDefault();
}
}