jquery Programming Glossary: indexbefore
jquery sortable: sorted item triggers reordering http://stackoverflow.com/questions/5441721/jquery-sortable-sorted-item-triggers-reordering this question This code could be what you want if I got what you are asking for http jsfiddle.net NsawH 84 var indexBefore 1 function getIndex itm list var i for i 0 i list.length i if itm 0 list i break return i list.length 1 i '#sortable' .sortable.. i for i 0 i list.length i if itm 0 list i break return i list.length 1 i '#sortable' .sortable start function event ui indexBefore getIndex ui.item '#sortable li' stop function event ui var indexAfter getIndex ui.item #sortable li if indexBefore indexAfter.. ui indexBefore getIndex ui.item '#sortable li' stop function event ui var indexAfter getIndex ui.item #sortable li if indexBefore indexAfter return if indexBefore indexAfter #div_container div indexBefore .insertAfter #div_container div indexAfter..
|