Page 1 of 1

Read item's index in a draggable droppable jquery ui list

Posted: Mon Jul 22, 2013 7:30 pm
by arnon

Hi,

Trying to read (get) items' index (order) in a draggable droppable jquery ui list. (jquery ui touch punch )

Trying this code:

---------------------

var list_item_1 = Appery("mobilelistitem_40");
alert('list_item_1 position is '+list_item_1.index());

Didn't work
What code do I need?

Thanks,
Arnon.


Read item's index in a draggable droppable jquery ui list

Posted: Mon Jul 22, 2013 8:09 pm
by Maryna Brodina

Hello! Try the following code:
codeAppery("mobilelistName").find("a").index(Appery("mobilelistitemName"))/code
where mobilelistName - name of entire List
(counting starts from 0, not 1)


Read item's index in a draggable droppable jquery ui list

Posted: Wed Jul 24, 2013 5:26 pm
by arnon

OK, What is the "a" in the .find(a) for?


Read item's index in a draggable droppable jquery ui list

Posted: Wed Jul 24, 2013 5:55 pm
by arnon

Thanks. That helped.
Arnon.