Jquery UI 在IE9中bug

来源:互联网 发布:人工智能消灭人类 知乎 编辑:程序博客网 时间:2024/06/12 01:51


推荐看下这篇文章: http://forum.jquery.com/topic/jquery-ui-does-not-work-on-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> 


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


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


0 0
原创粉丝点击