IE8下窗口拖动效果,总感觉抖动得厉害
本帖最后由 business122 于 2012-12-18 16:30:23 编辑
是这样的,先前用JQuery UI里的draggable实现弹出窗口的拖动效果感觉在IE8下感觉有些抖动,后来自己写了代码实现效果还是有这个问题,不知道各位大哥们有没有遇到过类似的问题。代码如下:
$newWin.draggable{(
handle: 'div.win_title'
iframeFix: false,
scroll: false
)}
自己后来写的:
function Do_WinChange(minWidth, minHeight) {
var dragging = false;
var resizing = false;
var iX, iY;
var w, h;
var l, t;
$("#myWin_welcome").mousedown(function (e) {
w = parseInt($("#myWin_welcome").css("width"));
h = parseInt($("#myWin_welcome").css("height"));
l = $("#myWin_welcome").offset().left;
t = $("#myWin_welcome").offset().top;
iX = e.clientX - l;
iY = e.clientY - t;
if (w - iX < 12 || h - iY < 12) {
resizing = true; ; //伸缩窗口
}
else {
dragging = true;
}
this.setCapture && this.setCapture();
return false;
});
document.onmousemove = function (e) {
var e = e || window.event; //获取事件
if (dragging) {
var oX = e.clientX - iX;
&nbs