This is more of a base javascript question - it's not specific to jQuery. In the HTML DOM, if I'm inside an iframe "this" refers to the local window and I can refer to my parent using "parent". I just want to know if there is something similar for functions running inside of objects that are children of another object.
On May 6, 5:34 pm, nick name <[EMAIL PROTECTED]> wrote: > Hey, > > I just started using jquery so not to sure, however I use Base.js > > http://dean.edwards.name/weblog/2006/03/base/ > > It gives alot of oo features and solves your issue above. > > To do it in jquery I'II have to do some more reading > > Hopes this helps > > On May 7, 8:19 am, Daemach <[EMAIL PROTECTED]> wrote: > > > I am finally figuring objects out - yay :) If I use a constructor to > > create a new object (car), I can refer to its properties and methods > > from within that object with "this" (this.model). If I set one if its > > properties (this.engine) to another new object (new engine()), is > > there a standard way to refer back to properties/methods in the parent > > object from within this new object (this.parent.model) ? I've been > > passing a reference to the new object (new engine(this) -- engine = > > function(root){ this.root = root;} ) so I can get at methods easily, > > but that seems messy. I don't like the thought of circular references > > even if they are benign :)