错误jquery-ui可拖动无法读取属性"msie" [英] Error jquery-ui draggable Cannot read property 'msie'

查看:72
本文介绍了错误jquery-ui可拖动无法读取属性"msie"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使工作 jquery-ui可拖动时遇到了一些麻烦.我将与您分享我的解决方案,这是最好的解决方案?

I got some troubles to make work jquery-ui draggable. I will share with you my solution, this is the best solution?

在开始实际工作之前,我只是将其插入进行测试.

I just insert this to test before I start my real work.

<script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.24/jquery-ui.min.js"></script>

  $('img').draggable();

例如此处: http://jsbin.com/eqowet/2/

但是我得到一个错误:

错误:未被捕获的TypeError:无法读取未定义的属性"msie".

Error: Uncaught TypeError: Cannot read property 'msie' of undefined.

推荐答案

msie是 jQuery上的标志.browser 属性

jQuery.browser 从1.3版开始就已弃用,并已在jQuery 1.9.0中删除

jQuery.browser was deprecated since version 1.3 and was removed in jQuery 1.9.0

由于您使用的是最新版本的托管jQuery,因此您的库已自动升级到1.9.0,因此会出现错误.

Since you're using the latest version of hosted jQuery, your library was auto-upgraded to 1.9.0 hence the error.

您已经意识到,恢复到1.8.3(或更早版本)可以解决此问题;但是,真正的解决方案是停止使用 jQuery.browser

As you've already realized, reverting back to 1.8.3 (or earlier version) fixes the issue; the real solution, however, is to stop using jQuery.browser

这篇关于错误jquery-ui可拖动无法读取属性"msie"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆