Revision: 57004
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 2, 2012 17:07 by manolis
Initial Code
$.fn.isEqual = function($otherSet) { if (this === $otherSet) return true; if (this.length != $otherSet.length) return false; var ret = true; this.each(function(idx) { if (this !== $otherSet[idx]) { ret = false; return false; } }); return ret; }; var a=$('#start > div:last-child'); var b=$('#start > div.live')[0]; console.log($(b).isEqual(a));
Initial URL
Initial Description
Selectors are ARRAYs ... so you should do something like this <div></div> $('div.a')[0] == $('div#a')[0] or use the bellow method
Initial Title
JQuery Compare Selectors
Initial Tags
Initial Language
jQuery