How do I compare two jQuery objects for identity? August 11, 2023 by Tarik You can also do: if(val.is(this))