or
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"
});
}
}
}