sort the data, and style the nodes.
var arr = dojo.query("li",this.domNode); if (this.sortable){ this.descending = !this.descending; dojo.addClass(this.titleNode,((this.descending)?"sortListDesc":"sortListAsc")); dojo.removeClass(this.titleNode,((this.descending)?"sortListAsc":"sortListDesc")); arr.sort(this._sorter); if(this.descending){ arr.reverse(); } } var i=0; dojo.forEach(arr,function(item){ dojo[(i++)%2 === 0 ? "addClass" : "removeClass"](item,"sortListItemOdd"); this.containerNode.appendChild(item); },this);