Hello,
I have this Fiddle: using .is()
http://jsfiddle.net/BCAKs/1/<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>html demo</title>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
<ul>
<li>
<span>
<i>Foo</i>
</span>
</li>
<li class='special'>Bar</li>
</ul>
<ul>
<li>
<span>
<i>Foo111</i>
</span>
</li>
<li>Bar222</li>
</ul>
<script>
$(document).ready(function()
{
var $a = $( 'li' ).clone();
var $b = $( 'li' ).clone();
console.log($a.is($b)); // Should print true but prints false
});
</script>
</body>
</html>
To learn more about the clone method.
I cloned an object twice and then compared the 2 objects together. I thought they are the same,
but I am getting they are not.
Maybe I am using the wrong method?
Jim