Hi,
I have a listview that when an item is clicked an overlay view is displayed. When the overlay is shown I want to be able to change the Navbar title. However this is not working when I use the code listed in the documentation.
The HTML code I have for the overlay is:
and the javascript that relates to the listview and the changing of the navbar title:
The error message i receive when this is run is:
'undefined' is not an object.
However if I use jquery to look up any of the elements, they are accessable
Not sure what to try next.....
Chris
I have a listview that when an item is clicked an overlay view is displayed. When the overlay is shown I want to be able to change the Navbar title. However this is not working when I use the code listed in the documentation.
The HTML code I have for the overlay is:
<
div
data-role
=
"view"
data-title
=
"View Title"
id
=
"fav-list"
data-transition
=
"overlay:up"
>
<
header
data-role
=
"header"
>
<
div
id
=
"fav-list-navbar"
data-role
=
"navbar"
>
<
a
class
=
"nav-button"
data-align
=
"left"
href
=
"#my-favourites"
data-transition
=
"overlay:up reverse"
data-role
=
"backbutton"
>Back</
a
>
<
span
data-role
=
"view-title"
></
span
>
</
div
>
</
header
>
</
div
>
and the javascript that relates to the listview and the changing of the navbar title:
function
mobileListViewHeadersInit() {
$(
"#myfavlist"
).kendoMobileListView({
dataSource: kendo.data.DataSource.create({data: jsonObj, group:
"letter"
}),
template: $(
"#myfavlistTemplate"
).html(),
headerTemplate:
"${value}"
,
fixedHeaders:
true
,
click:
function
(e) {
try
{
$(
"#fav-list-navbar
"
).data(
"kendoMobileNavBar"
).title(
"Foo"
);
}
catch
(ee)
{
alert(
"Error: "
+ ee.message);
}
window.location =
"#fav-list"
;
//alert(e.dataItem.name);
}
});
}
The error message i receive when this is run is:
'undefined' is not an object.
However if I use jquery to look up any of the elements, they are accessable
Not sure what to try next.....
Chris