or
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Untitled Document</title> <link href="css/kendo.mobile.all.min.css" rel="stylesheet" /> <script src="js/jquery.min.js"></script> <script src="js/kendo.all.min.js"></script></head><body><div data-role="view" id="foo"> <a href="#protected" data-role="button">Go to protected</a></div><div data-role="view" id="protected" data-before-show="redirectBack"> I am a protected view</div><script> var app = new kendo.mobile.Application(); function redirectBack(e) { alert('s'); e.preventDefault(); app.navigate("#foo"); }</script></body></html>function touchstart_inbox(e) { var target = $(e.touch.initialTouch), listview = $("#group-inbox").data("kendoMobileListView"), model, button = $(e.touch.target).find("[data-role=button]:visible"); if (target.closest("[data-role=button]")[0]) { var ID = $(e.touch.currentTarget).find(".msgID").attr("data-id"); if (target.closest("[data-role=button]")[0].id == "InboxDeleteButton") { $.ajax({ type: 'PUT', url: '/api/Message/' + ID + "/?decision=1", success: function () { dataSource.remove(model); }, failure: function (errMsg) { alert("Something happened. Triage not recorded"); }, dataType: "json" }); }}}