gpt4 book ai didi

jQuery 1.9.0 自 1.6.4 以来已弃用、删除和更改的功能列表

转载 作者:行者123 更新时间:2023-12-03 22:13:52 28 4
gpt4 key购买 nike

我们目前正在将应用程序中的 jQuery 从 jQuery 1.6.4 升级到 1.9.0。

我相信我已经在我们的应用程序中修复了大部分更改,但是,我希望能够从功能性 jQuery 更改的半固定列表中进行确定。

到目前为止,我看到的唯一两个主要变化是删除了 .live$.browser特点。

还有一些问题导致我们将 jquery UI 升级到最新版本。

我们有一个大型应用程序,我们最终获得了放弃对 IE 6 支持的批准,因此正在努力使其更接近现代。

我并不是在寻找每个版本的完整更改日志,因为更改日志包含很多我并不真正关心的内容。希望这也能帮助其他人进行升级过程。

我正在寻找的内容:已弃用的函数已删除的函数重要的功能更改,例如旧的 attrprop

自 jQuery 1.6.4 到 1.9.2 以来,有哪些已弃用、删除的功能以及重要的功能更改...

最佳答案

由于此问题可能已关闭,因此 nhahtdh 建议提交答案以便稍后编辑和添加信息,这是有道理的。请随意进行更改以添加其他更改注释,甚至将其增加到最新版本的 jQuery (1.10)

>= jQuery 1.6.4

没有发现重大变化

>= jQuery 1.7.1

没有发现重大变化

>= jQuery 1.7.2

来自文档:如果您使用的是 jQuery Mobile,请仅将 jQuery 1.7.2 与 jQuery Mobile 1.1 一起使用。对于以前版本的 jQuery Mobile,请保留 jQuery core 1.7.1 或更早版本。

>= jQuery 1.8.0

值得关注的核心变化:

  • 动画 - 核心更改
  • CSS 前缀

    • 来自 jquery:

      When you use a CSS property, in either .css() or .animate(), we’ll use the correct prefixed property (when appropriate) for that browser. For example, take .css("user-select", "none"); in Chrome/Safari we’ll set the value as "-webkit-user-select", Firefox will use "-moz-user-select", and IE10 will use "-ms-user-select".

  • 数据:

    The .data() method had an undocumented and incredibly non-performant way to monitor setting and getting of values that was removed in 1.9. This has affected the interpretation of data names that contain periods, in a good way. As of 1.9, a call to .data("abc.def") retrieves the data for the name "abc.def" only, and never just "abc". Note that the lower-level jQuery.data() method never supported events and so it has not changed. The jQuery Migrate plugin does not restore the old behavior for this case.

  • .curCSS:这对我来说很重要。升级新的 jQuery UI 解决了这个问题,但需要注意的是,如果不升级,这会破坏很多东西。

    $.curCSS: This method was simply an alias for jQuery.css() from jQuery 1.3 onward. Although it has never been part of the documented API, some external code has been known to use it, perhaps thinking it was “more efficient.” Now it’s “more gone.”

>= jQuery 1.8.1

jQuery 注释:使用 jQuery UI 1.8.23 和 jQuery Mobile 1.1.1 或更高版本,以获得与 jQuery 核心 1.8.1 的最佳兼容性。

不要使用 Quirks 模式! http://blog.jquery.com/2012/08/30/jquery-1-8-1-released/

>= jQuery 1.8.2

MAKE .OFFSET() CALC LESS WRONG ON BROWSERS W/O GETBOUNDINGCLIENTRECT

>= jQuery 1.8.3

没有发现重大变化

>= jQuery 1.9.0 来自 http://jquery.com/upgrade-guide/1.9/

  • .toggle(function, function, ... ) 已删除

    This is the "click an element to run the specified functions" signature of .toggle(). It should not be confused with the "change the visibility of an element" of .toggle() which is not deprecated.

  • jQuery.browser() 已删除

  • .live() 已删除

  • .die() 已删除

  • jQuery.sub() 已删除

  • .add() 更改 http://jquery.com/upgrade-guide/1.9/#add-

  • .addBack(选择器)替换.andSelf()http://jquery.com/upgrade-guide/1.9/#addback-selector-replaces-andself-

  • .after()、.before() 和 .replaceWith() 与断开连接的节点

  • .appendTo、.insertBefore、.insertAfter 和 .replaceAll

  • AJAX 事件应附加到文档

  • .trigger()ed“点击”事件中的复选框/单选状态

  • “焦点”事件的触发顺序

  • jQuery(htmlString) 与 jQuery(selectorString)

  • 事件不是由 .data() 方法触发的;带句点的名称

  • jQuery 集中断开连接的节点的排序

  • 在 HTML 内容中加载并运行脚本

  • .attr() 与 .prop()

  • oldIE 中的 $("input").attr("type", newValue)

  • “悬停”伪事件

  • jQuery 对象的.selector 属性

  • jQuery.attr()

  • jQuery.ajax 返回空字符串的 JSON 结果

  • jQuery.proxy() 上下文

  • .data("事件")

  • 删除了 Event 对象的属性

  • API 方法的未记录参数

当我发现更多问题时,我会查看并添加此内容。

关于jQuery 1.9.0 自 1.6.4 以来已弃用、删除和更改的功能列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14385221/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com