I have encountered code that leverages jQuery, similar to the following.
NAMESPACE = {
propertyA : $("#selector-a"),
propertyB : $("#selector-b")
}
$(NAMESPACE.propertyA).click(function(){
// ...
});
This seems to work, even though the syntax for attaching the click handler should be.
NAMESPACE.propertyA.click(function(){
// ...
});
Does jQuery have the built in ability to resolve the following, despite the incorrect syntax?
$($("#my-selector")).click ... etc.