Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jquerydraggable插件在chrome中工作时存在缺陷_Javascript_Jquery_Google Chrome_Jquery Plugins_Draggable - Fatal编程技术网

Javascript jquerydraggable插件在chrome中工作时存在缺陷

Javascript jquerydraggable插件在chrome中工作时存在缺陷,javascript,jquery,google-chrome,jquery-plugins,draggable,Javascript,Jquery,Google Chrome,Jquery Plugins,Draggable,我使用jquerydraggable插件,这是我的简单代码 $(document).ready( function () { $("#my_div").draggable(); }); 在html中 <div id="my_div" style="width: 100px; height: 100px; background-color: #090"> </div> 问题是:当我开始拖动时,对象自动跳到顶部,大约20像素。 元素

我使用jquerydraggable插件,这是我的简单代码

$(document).ready( function () {

    $("#my_div").draggable();           

});
在html中

 <div id="my_div" style="width: 100px; height: 100px; background-color: #090"> </div>

问题是:当我开始拖动时,对象自动跳到顶部,大约20像素。 元素每次移动时,元素都会跳到顶部。
这种出乎意料的跳跃只发生在谷歌chrome上,在其他浏览器中Dragable效果很好。我的chrome版本是最后一个,我在2台不同的计算机上测试了这一点,在这两台计算机上,这个“顶端跳跃”只发生在chrome上。有人知道为什么吗?如何在chrome中解决这个问题?

在这里,它在safari和chrome(Mac OS)中都非常有效。也许你应该做一个JSFIDLE,也许问题出在其他地方有draggable的例子,我的chrome中的这个带有“顶部跳转”缺陷,正如我所说的,它在这里工作很好,对不起,帮不上忙OK,谢谢你的帮助:)