Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
620 views
in Technique[技术] by (71.8m points)

html - What purpose do sizcache and sizset serve in jQuery

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>

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...