sizcache和sizset在jQuery中有什么作用 [英] What purpose do sizcache and sizset serve in 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?
推荐答案
仅供内部使用。
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屋!