のは、同様の要素が共通のクラス名、例えば `クラス=「elementType_n」を持っていることを前提にしてみましょう。次のように
次に、あなたは、すべて同様の要素を選択し、1として、または順序でそれらに基づいて行動することができます
のjavascript:
draggablesについては
$selection_n = $(".elementType_n");
$selection_n.on('eventType', function(){
//Here, depending on the action, either
//* act on $selection_n all together, eg. $selection_n.methodA(...)..methodB(...);
// or
//* act on $(this) with eg. $(this).methodA(...)..methodB(...); then use $(this)'s resulting properties to act on the rest of the selection, eg. $selection_n.not($(this).methodA(...)..methodB(...);
});
、と同情の隠し要素をドラッグしない点はありません目に見える、ドラッグされた要素。誰が彼らの動きを見るのだろうか?代わりに、drag.oncompleteハンドラを設定して、不可視のオフセットをドラッグして要素のオフセットと一致するように設定します。最終結果 - 同一。効率性 - それ以上。 (Droppableは別の問題です)。
この回答を見つけます。それは役に立つかもしれません。 http://stackoverflow.com/questions/793559/grouping-draggable-objects-with-jquery-ui-draggable – DG3