move

moves the specified item to a new position

string move(string sid,number tindex, [object tobj,object details] );
sid
stringthe ID of the item to move tindex
numbera new position of the item (a new index) tobj
objectthe object that the item is moved to detailsobjectextra parameters for moving
stringthe item ID

Example

// moving in the same list
$$("list").move("a12", 0);
$$("list").move("a13", -1);
 
// moves an item to a different list
var id = $$("list").move("a13", 0, $$("list2"));

Details

The details object can contain the following properties:

details = {};
details.parent = "a2"; //id of new parent element

If parent is defined - tindex will be child index inside the target branch.

See also
  • API
  • Articles
  • Back to top
    Join Our Forum
    We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.
    If you have not checked yet, be sure to visit site of our main product Webix javascript website framework and page of html treeview product.