I'm encountering problems retrieving my app's tab strip using JQuery. Sometimes it works, sometimes it doesn't. Code snippet below:
function updateBadges() {
console.log("Updating badges");
var tabstrip = $("#tabstrip").data("kendoMobileTabStrip");
if (tabstrip) {
var reminderCount = getRemindersDataSource().view().length;
console.log(reminderCount);
if (reminderCount > 0)
tabstrip.badge(2, reminderCount);
else
tabstrip.badge(2, false);
} else {
console.log("Can't find tabstrip");
}
}
Tabstrip is defined as:
<div id="tabstrip" data-role="tabstrip">
etc
Are there any constraints to be followed?
Thanks.
function updateBadges() {
console.log("Updating badges");
var tabstrip = $("#tabstrip").data("kendoMobileTabStrip");
if (tabstrip) {
var reminderCount = getRemindersDataSource().view().length;
console.log(reminderCount);
if (reminderCount > 0)
tabstrip.badge(2, reminderCount);
else
tabstrip.badge(2, false);
} else {
console.log("Can't find tabstrip");
}
}
Tabstrip is defined as:
<div id="tabstrip" data-role="tabstrip">
etc
Are there any constraints to be followed?
Thanks.