javascript - Why are jQuery objects inherently unique? -


reading jquery objects here, states jquery objects unique, if "this true if object created same selector or contain references exact same dom elements."

so example, following equate false:

$( "#logo" ) === $( "#logo" )

why jquery objects unique?

thanks

because, essentially, jquery using factory pattern creates new instance of jquery object selector each time call it.

as these different instances, not equal.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -