sizcache和sizset在jQuery中有什么作用 [英] What purpose do sizcache and sizset serve in jQuery

查看:96
本文介绍了sizcache和sizset在jQuery中有什么作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用jQuery,并在使用Dev Toolbar检查IE页面的DOM时,发现许多元素都有 sizset sizcache添加到元素的属性。我在Chrome或Firefox中看不到这些内容?另外,我看到页面上的许多元素都共享相同的值,这些字段让我相信这是一个全球价值,但有几个元素具有不同的值?

I am using jQuery, and in inspecting the DOM of my page in IE with the Dev Toolbar I see that many elements have sizset and sizcache attributes added to the element. I don't see these in Chrome or Firefox? Also, I see that many elements on the page share the same value for these fields leading me to believe it was a global value, but a few do have different values?

<html xmlns="http://www.w3.org/1999/xhtml" sizcache="66" sizset="0">
    <head>...</head>
    <body sizcache="66" sizset="0">
         <div class="ui-datepicker-group ui-datepicker-group-first" sizcache="18" sizset="0">
    </body>
</html>

有谁知道为什么IE只显示这些内容,以及它们的用途是什么?

Does anyone know why IE only shows these, and what purpose they serve?

推荐答案

http://groups.google.com/group/jquery-en/browse_thread/thread/2382a66a1ce9edf6/168046b517318240?lnk=gst&q= nodeIndex#168046b517318240


仅供内部使用。
jQuery核心文件使用它来

计算nth-child。这里是
源代码(我的重点):

it's meant for internal use only. The jQuery core file uses it to
calculate nth-child. Here is the source (with my emphasis):

它看起来像 nodeIndex sizcache sizset 全部用于内部计算第n个子元素。

It looks like nodeIndex and sizcache and sizset are all used internally to calculate the nth-child.

这篇关于sizcache和sizset在jQuery中有什么作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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