この質問に対する回答を得ようとしています。 javascriptでdraggableオプションを無効にするにはどうすればよいですか? APIドキュメントは、javascriptでドラッグ可能なオプションを設定する
.draggable({disable:true})と言っています。
または
.draggable( "オプション"、 "無効"、真の);
私にとってもそれはありません。ここに私が持っている図書館があります。
<link rel="stylesheet" href="http://jqueryui.com/themes/base/jquery.ui.all.css">
<script src="http://jqueryui.com/jquery-1.5.1.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.core.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.widget.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.mouse.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.resizable.js"></script>
<script src="http://jqueryui.com/ui/jquery.ui.draggable.js"></script>
私はこのようなコードでドラッグ可能オプションを無効にしようとしています。
editable.parent().draggable({disable: true});
editable.parent().draggable("option", "disable", true);
editable.parent()は正しい要素を見つけますが、ドラッグ可能なオプションはオフになっていません。
ありがとうございました。