jquery Programming Glossary: compa
jQuery - sort DIVs by className http://stackoverflow.com/questions/5076844/jquery-sort-divs-by-classname of the order var funcSort function a b Use parsePosition to determine the sortable criteria from the classes. var compA parsePosition a .attr 'class' position var compB parsePosition b .attr 'class' position return compA compB 1 compA compB.. the classes. var compA parsePosition a .attr 'class' position var compB parsePosition b .attr 'class' position return compA compB 1 compA compB 1 0 Select the list element. var list listElementSelector Select the list items and return them as.. var compA parsePosition a .attr 'class' position var compB parsePosition b .attr 'class' position return compA compB 1 compA compB 1 0 Select the list element. var list listElementSelector Select the list items and return them as an array. var..
Jquery Sortable Auto Sort http://stackoverflow.com/questions/6303528/jquery-sortable-auto-sort '#sort' .click function var mylist '#sortable' var listitems mylist.children 'li' .get listitems.sort function a b var compA parseFloat a .attr 'id' var compB parseFloat b .attr 'id' return compA compB 1 compA compB 1 0 .each listitems function.. 'li' .get listitems.sort function a b var compA parseFloat a .attr 'id' var compB parseFloat b .attr 'id' return compA compB 1 compA compB 1 0 .each listitems function idx itm mylist.append itm Once you got this array sorted you can simply.. listitems.sort function a b var compA parseFloat a .attr 'id' var compB parseFloat b .attr 'id' return compA compB 1 compA compB 1 0 .each listitems function idx itm mylist.append itm Once you got this array sorted you can simply order them..
|