2010-06-06 41 views
4

出於好奇,我無法在任何地方找到任何東西;有沒有人知道一種方法來獲取jQuery UI的可排序函數來動畫化它的排序?jQuery UI可排序的動畫轉換

我的意思是,當你將一個元素移動到可排序的父對象上時,它的子對象,可排序對象會跳過,而不是順利地將它們動畫到新的位置,除了作爲旁觀者之外,還可能使它有點難找出在哪裏移動了什麼。

這顯然沒有默認選項,但我希望也許某個人在某個地方有一個很好的解決方案。

+0

我要瘋了。我正在查看幾天前想要的確切插件,現在我一直在尋找並且無法再找到它。它的確定,它真的很好。也許我不會找到它,只是爲了告訴你不要放棄它。試着找到:) – XGreen 2010-06-06 12:25:54

回答

1

可悲的是,目前還不可能,因爲可排序的代碼只是更新元素的位置。雖然它指的是一個this.options.custom,它可能允許自定義動畫;雖然它然後完全沒有文件/不支持:

if(this.options.custom && this.options.custom.refreshContainers) { 
    this.options.custom.refreshContainers.call(this); 
} else { 
    for (var i = this.containers.length - 1; i >= 0; i--){ 
     var p = this.containers[i].element.offset(); 
     this.containers[i].containerCache.left = p.left; 
     this.containers[i].containerCache.top = p.top; 
     this.containers[i].containerCache.width = this.containers[i].element.outerWidth(); 
     this.containers[i].containerCache.height = this.containers[i].element.outerHeight(); 
    }; 
} 

可悲的是我不能提供更多的幫助;沒有太多的自我介紹給可分類代碼,所以上面的代碼提取可能會引起誤解。

+0

這是一個很好的指針。我會看看,看看有什麼關係。 – Heilemann 2010-06-07 13:59:31