js/Sortable/Sortable.js
function (order) {
			var items = {}, rootEl = this.el;

			this.toArray().forEach(function (id, i) {
				var el = rootEl.children[i];

				if (_closest(el, this.options.draggable, rootEl)) {
					items[id] = el;
				}
			}, this);

			order.forEach(function (id) {
				if (items[id]) {
					rootEl.removeChild(items[id]);
					rootEl.appendChild(items[id]);
				}
			});
		}
function (order) {
			var items = {}, rootEl = this.el;

			this.toArray().forEach(function (id, i) {
				var el = rootEl.children[i];

				if (_closest(el, this.options.draggable, rootEl)) {
					items[id] = el;
				}
			}, this);

			order.forEach(function (id) {
				if (items[id]) {
					rootEl.removeChild(items[id]);
					rootEl.appendChild(items[id]);
				}
			});
		}
function ( order ) { var items = { } , rootEl = this . el ; this . toArray ( ) . forEach ( function ( id , i ) { var el = rootEl . children [ i ] ; if ( _closest ( el , this . options . draggable , rootEl ) ) { items [ id ] = el ; } } , this ) ; order . forEach ( function ( id ) { if ( items [ id ] ) { rootEl . removeChild ( items [ id ] ) ; rootEl . appendChild ( items [ id ] ) ; } } ) ; }
Sorts the elements according to the array.
@param  {String[]}  order  order of the items
Sorts the elements according to the array .