简体   繁体   English

jQuery UI拖放在IE9中不起作用

[英]Jquery UI Drag and Drop not working in IE9

I have Jquery drag and drop working in firefox, but it does not work in IE9. 我有Jquery拖放在firefox中工作,但在IE9中不起作用。

I turned on display script errors on IE9 but its not displaying any errors.. 我在IE9上打开了显示脚本错误,但未显示任何错误。

The demo site is http://www.aussiehaulage.com.au/default.aspx 演示站点为http://www.aussiehaulage.com.au/default.aspx

I have the latest versions of Jquery and UI 我拥有最新版本的Jquery和UI

This issue will get fixed with this fix. 此问题将通过此修复程序得到解决。 Use this fix in your code and enjoy. 在您的代码中使用此修复程序并享受。

http://forum.jquery.com/topic/jquery-ui-sortable-and-draggable-do-not-work-in-ie9 This will be in jQuery UI 1.8.6. http://forum.jquery.com/topic/jquery-ui-sortable-and-draggable-do-not-work-in-ie9这将在jQuery UI 1.8.6中。

If you can't upgrade to 1.8.6 (yet), this hotfix will allow older versions of jQuery UI drag-and-drop to work with IE9: 如果您还不能升级到1.8.6,此修补程序将允许较旧版本的jQuery UI拖放以与IE9一起使用:

<script>
// HOTFIX: We can't upgrade to jQuery UI 1.8.6 (yet)
// This hotfix makes older versions of jQuery UI drag-and-drop work in IE9

(function($){
    var a=$.ui.mouse.prototype._mouseMove;
    $.ui.mouse.prototype._mouseMove=function(b){
        if($.browser.msie&&document.documentMode>=9){
            b.button=1
        };
        a.apply(this,[b]);
    }
}(jQuery));
</script>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM