jQuery UI draggable not working in chrome

拈花ヽ惹草 提交于 2019-12-13 09:05:22

问题


jQuery draggable not working in chrome

Code:

<script src="js/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.8.16.custom.min.js" type="type/javascript"></script>
<script type="text/javascript">
$(function() {
    $( ".drag" ).draggable();
});
</script>

<div class="drag">draggable</div>

回答1:


JS FIDDLE Test Try this. In my browser dargging works correctly. Working in your browser? If not working, then you wrong plugged jqueryui library.

<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

window.onload = function(){
    $( "#drag" ).draggable();
}



回答2:


It's simple, code is correct but Chrome extension adBlocker blocking draggable function. Just uninstall adBlocker and reset chrome.



来源:https://stackoverflow.com/questions/24014994/jquery-ui-draggable-not-working-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!