Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : 2 the same objects

$
0
0
What are you trying to accomplish by doing this?

While globals are not recommended, in this case you could simple do:
  1. window.Obj1 = new Position('#null2', {});
  2. window.Obj2 = new Position('#null3', {});
The options of each object will be unique, but as air_hadoken mentioned, the functions on both will point to the Position prototype.

Viewing all articles
Browse latest Browse all 3491

Trending Articles