w2toolbar.setCount

Updates badge text and style of the toolbar item with id.
setCount(id, count, [className], [style])
id string, id of the toolbar item
count text, count for the toolbar item, can be plain text
className text, (optional) custom class for the badge
style text, (optional) additional style for the badge
Returns undefined.

Description

The first argument id is the id of the toolbar item you used when you created toolbar items. The .items array holds all created toolbar items.
If you have toolbar defined in the following way: You can update badge by

User Comments

comments powered by Disqus