Q:

understanding new keyword association to jquery selector

How should I define whats going on here from left to right. I'm perplexed with the [0].nameofsomething part.  Stupid quesiton for bonus, can the [0] be any other integer too?  It looks like the jquery selector is now namespaced..is that correct?
$("#someselector")[0].nameofsomething = new MyObject();

and could this also be written like this....
$("#someselector").nameofsomething = new MyObject();

and produce exactly the same results?
thanks for any insight!

A:

The [0] selects the DOM object, so you are adding to the element.
$("#someselector")[0].nameofsomething  // this is same thing as document.getElementById("someselector").nameofsomething = {};

You are adding to the jQuery object
$("#someselector").nameofsomething

So they are not the same thing. 

