or
$.Deferred(function(){
var promise = this;
timer = setInterval(function() {
if ($("#my-drawer:not(:visible)")[0]) {
clearInterval(timer);
promise.resolve();
}
}, 100);
})
//in the view like this
app.filterService.viewModel.structureId
//model for filter
(function (global) {
var FilterModel,
app = global.app = global.app || {};
FilterModel = kendo.data.ObservableObject.extend({
structures: kendo.observable({ items: GetStructures()}),
structureId: 49118,
days: kendo.observable({
items: [
{ id: 7, name: "Past 7 Days" },
{ id: 30, name: "Past 30 Days" },
{ id: 60, name: "Past 60 Days" },
{ id: 90, name: "Past 90 Days" }]
}),
day: 7
});
app.filterService = { viewModel: new FilterModel() };
console.log(app.filterService.viewModel.structureId);
}
)(window);
<
link
href
=
"@Url.Content("
~/Content/kendo/2013.3.1119/kendo.bootstrap.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"@Url.Content("
~/Content/kendo/2013.3.1119/kendo.common-bootstrap.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"@Url.Content("
~/Content/kendo/2013.3.1119/kendo.mobile.all.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"@Url.Content("
~/Content/bootstrap/bootstrap.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"@Url.Content("
~/Content/bootstrap/bootstrap-theme.min.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
link
href
=
"@Url.Content("
~/Content/Site.css")"
rel
=
"stylesheet"
type
=
"text/css"
/>
<
script
src
=
"@Url.Content("
~/Scripts/kendo/2013.3.1119/jquery.min.js")"></
script
>
<
script
src
=
"@Url.Content("
~/Scripts/kendo/2013.3.1119/kendo.all.min.js")"></
script
>
@(Html.Kendo().MobileDrawer()
.Name("my-drawer")
.HtmlAttributes(new { style = "width: 270px" })
.Content(obj =>
Html.Kendo().MobileListView().Type("group")
.Items(root =>
{
root.Add().Text("Navigation");
root.Add().Text("Account");
})
)
)
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<!-- main area -->
<
div
class
=
"col-xs-12"
>
@RenderBody()
</
div
>
</
div
>
</
div
>
script src="@Url.Content("~/Scripts/bootstrap/bootstrap.min.js")" type="text/javascript"></
script
>
<
script
type
=
"text/javascript"
>
var app = new kendo.mobile.Application(document.body,
{
skin: "flat",
initial: @Url.Action("Index", "Home")
});
</
script
>