jsGears.com 技術論壇 - AJAX, JavaScript, jQuery, 網站開發, 前端效能優化's Archiver

jquery123456 發表於 2011-2-18 06:36

how to click to know the position in sortable list

[font=Arial, Helvetica, sans-serif][size=13px]i have the following code to get the change of position, I dont know how to make the list tell me the position of a specific element when i click it.
please give some idea. [list=1][*]$( "#sortable" ).sortable([*]{[*]               start:function(event, ui) {[*]
  startpos=( $(ui.item).prevAll().length );[*]               },[*][*]               stop:function(event, ui) {[*]                       stoppos=($(ui.item).prevAll().length );[*]               }[*]});[/list]
[/size][/font]

頁: [1]

Powered by Discuz! Archiver  © 2001-2009 Comsenz Inc.