Skip to content

Instantly share code, notes, and snippets.

@gabrieleromanato
Created January 13, 2014 19:10
Show Gist options
  • Save gabrieleromanato/8406169 to your computer and use it in GitHub Desktop.
Save gabrieleromanato/8406169 to your computer and use it in GitHub Desktop.
jQuery: comparing two elements
(function( $ ) {
$.equals = function( elem1, elem2 ) {
var domElem1 = $( elem1 ).get( 0 ),
domElem2 = $( elem2 ).get( 0 );
if( domElem1 !== domElem2 ) {
return false;
}
return true;
};
})( jQuery );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment