Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これは私が使用しているコードで、#div1 の下にとどまるには #div2、#div3、#div4 が必要です。
$(function() { $( "#div2, #div3, #div4" ).draggable({ stack: "#div2, #div3, #div4" }); });
z-index を試しましたが、うまくいきませんでした。
イベントを使用stopして要素をループし、zインデックスを調整できます
stop
$( "#div2, #div3, #div4" ).draggable({ stop: function() { /* adjust z-indexes here*/ } })