seo免费优化网站,怎么修改wordpress模板,湖南十大龙头企业,wordpress 路由器jQuery 1.2 中抛弃了不少之前的功能#xff0c;因此不能向前兼容#xff0c;而有不少非官方的 jQuery 插件#xff08;比如 thickbox#xff09;#xff0c;使用的是 jQuery 1.2 之前的语法开发的#xff0c;如果这次还未根据新版本更新的#xff0c;则可能会出现问题。…jQuery 1.2 中抛弃了不少之前的功能因此不能向前兼容而有不少非官方的 jQuery 插件比如 thickbox使用的是 jQuery 1.2 之前的语法开发的如果这次还未根据新版本更新的则可能会出现问题。下面是一些新的写法主要是关于选择器 (Selector) 的语法方面 $(div//p) XPath Descendant SelectorPlease use the CSS $(div p) selector instead. Or, use the XPath Compatibility Plugin. $(div/p) XPath Child SelectorPlease use the CSS $(div p) selector instead. Or, use the XPath Compatibility Plugin. $(p/../div) XPath Parent SelectorPlease use the $(p).parent(div) selector instead. Or, use the XPath Compatibility Plugin. $(div[p]) XPath Contains Predicate SelectorPlease use the new $(div:has(p)) selector instead. Or, use the XPath Compatibility Plugin. $(a[href]) XPath Attribute SelectorNote: While this selector is deprecated, it has not yet been removed as of this release (jQuery 1.2).It is now recommended that you use the CSS selector $(a[href]) instead. Or, use the XPath Compatibility Plugin. 另有一个 jquery.xpath.js 的插件做向前兼容但我测试下来好像不理想有很多会不生效。现在比较好的做法是修改老代码中使用到 XPath Selector 的语法为 CSS Selector.全部的更改列表需要仔细阅读 jQuery 1.2 的发布说明http://docs.jquery.com/Release:jQuery_1.2这里只是我对比较重要的方面的一个摘录。另外不能理解的就是 jQuery 为什么要把 XPath Selector 的功能分离出去。。。转载于:https://www.cnblogs.com/RChen/archive/2007/09/27/908354.html