I posed the example as I did because when you move element 5 from position 5 to position 2 you are only moving one element, but it's affecting the position of 4 elements (2, 3, 4, 5). So when you say you only want to know about two elements, I'm confused about which two you would be talking about in my example. Are you saying you only want the elements that have moved?
Perhaps grab the index of the element in the start callback and then again in the stop/change. Then your range of affected elements is between those two indexes. - Richard On Sat, Dec 6, 2008 at 3:53 PM, Bhavin <[EMAIL PROTECTED]> wrote: > > Hi Richard, > > Thanks for replying. I am trying to save /update sequence of elements > whenever it is changed. In following example, if you move 3rd element > at 2nd position then I wanted those two elements only in JS instead of > complete list. But it looks when we change sequence and try to save > the ordering then we need to fire updates for all the elements for > that position is changed..I am trying to figure out for better > approach here... > > Thanks, > Bhavin > > On Dec 6, 6:28 am, "Richard D. Worth" <[EMAIL PROTECTED]> wrote: > > I'm not sure your sample provides quite enough detail of what you're > going > > for. If you have the following > > > > <ul> > > <li id="1" class="exampleclass"></li> > > <li id="2" class="exampleclass"></li> > > <li id="3" class="exampleclass"></li> > > <li id="4" class="exampleclass"></li> > > <li id="5" class="exampleclass"></li> > > <li id="6" class="exampleclass"></li> > > </ul> > > > > and you drag 5 to be in-between 1 and 2, like so, > > > > <ul> > > <li id="1" class="exampleclass"></li> > > <li id="5" class="exampleclass"></li> > > <li id="2" class="exampleclass"></li> > > <li id="3" class="exampleclass"></li> > > <li id="4" class="exampleclass"></li> > > <li id="6" class="exampleclass"></li> > > </ul> > > > > then what do you want? > > > > - Richard > > > > > > > > On Fri, Dec 5, 2008 at 7:15 PM, Bhavin <[EMAIL PROTECTED]> > wrote: > > > > > Hi, > > > > > I am trying to find out element which are dragged & dropped on the > > > list in following method: > > > > > $("#example").sortable({ > > > //if i move "1" at second position then here i want array of > > > ids 2,1 sequence. ?? > > > // I tried selector but it gives me all the elements. ie. > > > 2,1,3. > > > }); > > > > > <ul> > > > <li id="1" class="exampleclass"></li> > > > <li id="2" class="exampleclass"></li> > > > <li id="3" class="exampleclass"></li> > > > </ul> > > > > > Can anyone help me on this?- Hide quoted text - > > > > - Show quoted text - > > >