How can we compare two HTML elements whether they are identical or not ?
I tried this thing but no luck
Hi this is sachin ten
Why not do it the easy way?
Hi this is sachin tendulkar Hi this is sachin tendulkar if($('#div1').html() == $('#div2').html()) alert('div1 & div2 are the same'); else alert('div1 & div2 are different');
http://jsfiddle.net/5Zwy8/1/