简体   繁体   中英

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.

I turned on display script errors on IE9 but its not displaying any errors..

The demo site is http://www.aussiehaulage.com.au/default.aspx

I have the latest versions of Jquery and 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.

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:

<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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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