How exactly .data () attaches data to elements?

Possible duplicate:
How does jQuery.data () work?

 <script>
    $("div").data("test", { first: 16, last: "pizza!" });
    </script>

I thought that with the help of Google Chrome Developer Tools, I could see something like:

<div first="16" last="pizza!"></div>

but i could not.

How exactly .data () attaches data to elements? Is there any chance that I can see / check data without calling the .data () method?

+5
source share
1 answer

From this question: How does jQuery.data () work? it seems that jQuery contains an internal cache object for storing elements. From this answer, you will also see that this can be done through the javascript console via:

 $.cache

which will give you all the meanings if I am not mistaken.

0

All Articles