このコードは機能しますが、実際には「on」を使用するように切り替える必要がある古いレガシー関数「livequery」を使用しています。しかし、私の人生では、これを機能させることはできません。これが私のコードスニペットです。
jQuery('.box').livequery(function(){
jQuery('a', this).click(function() {
return false;
});
jQuery(this).draggable({
appendTo: "body",
helper: 'clone',
opacity: 0.5,
zIndex: 900,
stop: function(event, ui) {
return true;
}
});
});
そして、私はこれを試しました...
jQuery('.box').on('draggable', function(){
jQuery('a', this).click(function() {
return false;
});
jQuery(this).draggable({
appendTo: "body",
helper: 'clone',
opacity: 0.5,
zIndex: 900,
stop: function(event, ui) {
return true;
}
});
});
「ドラッグ可能」はイベント名ではないと推測しているため、機能しませんでした...
ありがとう..