I would suspect this to work at first:
if ($('#element') == $('#element')) alert('hello');
但事实并非如此.如何测试元素是否相同?
I would suspect this to work at first:
if ($('#element') == $('#element')) alert('hello');
但事实并非如此.如何测试元素是否相同?
从jquery 1.6开始,您现在只需执行以下操作:
$element1.is($element2)