Jquery ui 滚动时未释放Jquery UI可拖动事件
我正在将jQueryUI库的可拖动事件应用到弹出窗口。拖动工作正常,但问题是,如果窗口有滚动,并且如果我单击滚动,则会触发拖动事件,并且弹出窗口正在移动,并且即使滚动事件被释放,拖动事件也不会被释放。。。你能告诉我如何克服它吗 这是我的代码片段…请检查并让我知道错误是什么Jquery ui 滚动时未释放Jquery UI可拖动事件,jquery-ui,scrollbar,draggable,Jquery Ui,Scrollbar,Draggable,我正在将jQueryUI库的可拖动事件应用到弹出窗口。拖动工作正常,但问题是,如果窗口有滚动,并且如果我单击滚动,则会触发拖动事件,并且弹出窗口正在移动,并且即使滚动事件被释放,拖动事件也不会被释放。。。你能告诉我如何克服它吗 这是我的代码片段…请检查并让我知道错误是什么 <html> <head> <title> New Document </title> <meta name="Generator" content="EditP
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" ></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" ></script>
<style>
#Outer{
width:400px;
height:100px;
border:1px solid blue;
position:absolute;
overflow:auto;
}
#Hdr{
background:#ffcc99;
border-bottom:1px solid blue;
}
</style>
</head>
<body>
<div id="Outer">
<div id="Hdr">About India</div>
<div>
The Indian economy is the world's tenth-largest by nominal GDP and third-largest by purchasing power parity (PPP).
Following market-based economic reforms in 1991, India became one of the fastest-growing major economies; it is considered a
newly industrialised country. However, it continues to face the challenges of poverty, illiteracy, corruption, and inadequate public healthcare.
</div>
</div>
</body>
<script>
$(document).ready(function(){
$('#Outer').draggable();
});
</script>
</html>
新文件
#外{
宽度:400px;
高度:100px;
边框:1px纯蓝色;
位置:绝对位置;
溢出:自动;
}
#Hdr{
背景:#ffcc99;
边框底部:1px纯蓝色;
}
关于印度
按名义GDP计算,印度经济是世界第十大经济体,按购买力平价(PPP)计算,印度经济是世界第三大经济体。
在1991年基于市场的经济改革之后,印度成为增长最快的主要经济体之一;这被认为是一个错误
新兴工业化国家。然而,它仍然面临贫困、文盲、腐败和公共医疗不足的挑战。
$(文档).ready(函数(){
$('#Outer').draggable();
});
您可能希望使用处理程序绕过该问题:如此处所示
HTML:
<div id="Outer">
<div id="Hdr">About India</div>
<div id="Inner">
The Indian economy is the world's tenth-largest by nominal GDP and third-largest by purchasing power parity (PPP).
Following market-based economic reforms in 1991, India became one of the fastest-growing major economies; it is considered a
newly industrialised country. However, it continues to face the challenges of poverty, illiteracy, corruption, and inadequate public healthcare.
</div>
</div>
JS:
您可能希望使用一个处理程序来绕过这个问题:比如这里 HTML:
<div id="Outer">
<div id="Hdr">About India</div>
<div id="Inner">
The Indian economy is the world's tenth-largest by nominal GDP and third-largest by purchasing power parity (PPP).
Following market-based economic reforms in 1991, India became one of the fastest-growing major economies; it is considered a
newly industrialised country. However, it continues to face the challenges of poverty, illiteracy, corruption, and inadequate public healthcare.
</div>
</div>
JS:
$(document).ready(function(){
$('#Outer').draggable({handle: "#Hdr"});
});