Hello,
I am using kendo mobile, and I am trying to navigate to a view in page-init event, but it is not working.
When I am running the simple code above, click on the 'favorites' icon of the tabstrip, I am expecting to navigate to the 'login' view, but it is not working well.
Am I missing anything?
Thanks,
Amr
I am using kendo mobile, and I am trying to navigate to a view in page-init event, but it is not working.
<!DOCTYPE html>
<
html
>
<
head
>
<
title
></
title
>
<
script
type
=
"text/javascript"
charset
=
"utf-8"
src
=
"jquery.min.js"
></
script
>
<
script
type
=
"text/javascript"
charset
=
"utf-8"
src
=
"kendo.mobile.min.js"
></
script
>
<
link
href
=
"kendo.mobile.all.min.css"
rel
=
"stylesheet"
/>
</
head
>
<
body
>
<
div
data-role
=
"view"
id
=
"settings"
data-layout
=
"commonLayout"
>
Login
</
div
>
<
div
data-role
=
"view"
id
=
"favorites"
data-layout
=
"commonLayout"
data-init
=
"favoritesPageInit"
>
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
>
<
script
type
=
"text/javascript"
charset
=
"utf-8"
>
var app = new kendo.mobile.Application($(document.body), { initial: "settings" });
function favoritesPageInit(e){
app.navigate("#settings");
}
</
script
>
</
body
>
</
html
>
Am I missing anything?
Thanks,
Amr