How jQuery data() breaks circular reference
问题 I have read an why it's better and how it's implemented. But what i don't really understand is how does it break the circular reference? . how does it break the reference circle? $(div1).data('item', div2); $(div2).data('item', div1); like example, the divs above point to each other, how is it prevented? I have a hunch, but i just want to make sure if my hunch is right. 回答1: The circular reference problem happens in some browsers when you put a reference to a DOM object on a DOM object as a