gpt4 book ai didi

javascript - 在jquery中拖动

转载 作者:行者123 更新时间:2023-11-28 07:06:11 27 4
gpt4 key购买 nike

我已将标尺放在特定的 div 内,一切正常。
但标尺只允许我从窗口的整体拖动,但它显示了我所包含的 div 内的标尺线。
我想将其从放置标尺的 div 中拖出。我已经从屏幕边距拖动了 0px 来拖动蓝线。
但我想从红线拖动,这基本上是我的 div。提前致谢。

在 html 中:-

<div style="width: 100px;height: 400px;" class="demo">
<div class="main-wrapper" id="test" style="width: 400px;height: 300px;"></div></div>

我正在使用 RulersGuides js,我希望在主包装类中进行拖动。

最佳答案

  $(function() {
$( "#main-wrapper" ).draggable();
});
</script>
Use the below jquery plugins to work properly.
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>

关于javascript - 在jquery中拖动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31698209/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com