move

moves items to different positions

string|string[] move(string|string[] id,number index,object target,string targetId);

Parameters

idstring|string[]the ids of items to move
indexnumberthe index to move items to
targetobjectoptional, the target tree collection object
targetIdstringoptional, the id of the parent item where the moved items will be placed

Returns

string|string[]the item's id or an array with ids of items

Example

toolbar.data.move("profile_btn",-1);

Details

The ID should always be a string, even if in the control configuration you've set it as a number.

Back to top