On 27 August 2010 12:23, Richard Quadling <rquadl...@gmail.com> wrote: > Hi. > > What is the best way to handle an option that could be ... > > 1 - An elements ID : 'id' > 2 - An extended element : $('id') > 3 - A CSS rule : 'div#locked' > 4 - An array for a CSS rule : $$('div#floating') > 5 - An array of any of the above : ['id', $('id'), 'div#locked', > $$('div#hidden')] > > The use case is to tell a class what it has to work with. > > var myGrid = new CBGrid('id', {before:xxxx, after:yyyy}); // for example > > where xxxx and yyyy are, in some way, the elements I want to interact with. > > Essentially, I want to be able to call invoke... > > this.options.before.invoke(....); > this.options.after.invoke(...); > > sort of thing. > > > -- > Richard Quadling. >
Another option I may end up using is simply to provide a hook for callbacks to allow the user to do what ever they want. This seems easier. Or am I missing a trick here? -- Richard Quadling. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.