badge

Introduced in Q1 2013 SP Sets a badge on one of the tabs with the specified value. If invoked without second parameter, returns the tab's current badge value. Set the value to false to remove the badge.

Parameters

tab Selector|Number

The target tab specified either as a jQuery selector/object or as an item index.

value String|Boolean

The target value to be set or false to be removed.

Returns

String|kendo.mobile.ui.TabStrip Returns the badge value if invoked without parameters, otherwise returns the TabStrip object.

Example

<div id="foo" data-role="view" data-init="onInit">
  <div data-role="footer">
    <div data-role="tabstrip">
      <a data-icon="contacts">foo</a>
      <a data-icon="contacts">bar</a>
      <a data-icon="info">baz</a>
    </div>
  </div>
</div>

<script>
var app = new kendo.mobile.Application();
function onInit(e) {
  var tabstrip = e.view.footer.find(".km-tabstrip").data("kendoMobileTabStrip");

  // Set the first tab badge value to 5
  tabstrip.badge(0, 5);
  // Get the current badge value on the first tab.
  console.log(tabstrip.badge(0));
}
</script>
In this article
Not finding the help you need?