w2toolbar.get

Finds toolbar item with id and returns it or its index.
get([id], [returnIndex])
id string, id of the toolbar item (optional)
returnIndex boolean, if true returns index in the items array (optional)
Returns object or integer or null.

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 toolbar item was not found it will return null.
The second optional argument returnIndex indicates if you want the toolbar item or its index in the .items array.
If you have toolbar defined in the following way: You can get toolbar item: You can also get toolbar menu item:

User Comments

comments powered by Disqus