dojox/mobile/Badge (version 1.10)

Summary

A utility class to create and update a badge node.

Badge is not a widget, but a simple utility class for creating and updating a badge node. A badge consists of a simple DOM button. It is intended to be used from other widgets such as dojox/mobile/IconItem or dojox/mobile/TabBarButton.

Usage

var foo = new Badge(params,node);
dojox/mobile/Badge
Parameter Type Description
params Object
Optional

Contains properties to be set.

node DomNode
Optional

The DOM node. If none is specified, it is automatically created.

See the dojox/mobile/Badge reference documentation for more information.

Property Summary

Method Summary

  • getValue() Returns the text shown in the badge.
  • setValue(value) Set a label text to the badge.

Properties

className
Defined by: dojox/mobile/Badge

A CSS class name of a DOM button.

fontSize
Defined by: dojox/mobile/Badge

Font size in pixel. The other style attributes are determined by the DOM button itself. Note that changing the value of the property after the badge creation has no effect.

value
Defined by: dojox/mobile/Badge

A text to show in a badge. Note that changing the value of the property after the badge creation has no effect.

Methods

getValue()
Defined by dojox/mobile/Badge

Returns the text shown in the badge.

Returns:string
setValue(value)
Defined by dojox/mobile/Badge

Set a label text to the badge.

Parameter Type Description
value String
Error in the documentation? Can’t find what you are looking for? Let us know!