element as static class ?
Maybe this is inappropriate jquery usage... but I'm developing a module based application where each "module" is contained in a div and it would be nice to declare methods for each module and be able to call them without instantiating a class instance or using extra objects, like so:
- $("#module-one").start();
- $("#module-two").start();
- $("#module-three").start();
Where start() is defined
differently for each of these implementations. Maybe I just don't understand the framework very well. In comparison to more traditional programming style, I want three static classes, or three singleton classes even, with the jquery object being the instance.
Is this stupid :?
Maybe I can just use plain JavaScript to make the classes and declare a target property on each that holds a reference to the corresponding jquery object?
Thanks and best, -p