Checks toolbar item or items with id (visually looks like pressed button).
check(id1, [id2], ...)

id | string, id of the toolbar item

Returns integer.

#### Description

The item(s) must exists in the .items array of the toolbar. The toolbar item is identified by the .id property. If the toolbar item is part of the radio group, all items in the group that were checked will be unchecked. The method returns the number of checked items that were unchecked before.
If you have toolbar defined in the following way: $('#toolbar').w2toolbar({ name : 'toolbar', items : [ { type: 'check', id: 'item1', text: 'Check', img: 'icon-page', checked: false }, { type: 'radio', id: 'item3', group: '1', text: 'R-1', img: 'icon-add' }, { type: 'radio', id: 'item4', group: '1', text: 'R-2', img: 'icon-add' } ] }); You can check toolbar item: w2ui['toolbar'].check('item1');