object comparison

object comparison

How do I go about comparing two jquery objects to see if they're actually the same html object. I've got:

  1. $("...").each(function(){
  2. if($(this) != someobject) {
  3. $(this).css("border", "1px solid red");
  4. }
  5. });
This should add a border to every object in the selected set except for the one defined in someobject... shouldn't it. 

What am I doing wrong here?