making EventUtil a class
I'm trying to make a set of divs that will be dynamically added to a page draggable. I have been trying to decide the best way to go about it. I created a dragDiv class that I instantiate for each div. I've considered changing the EventUtil code so it becomes a class and then have the dragDiv class inherit the EventUtil code, so each div I instantiate will have it's own set of handlers. Does it sound like I am going in the right direction? On page 292 you say because there are no properties (for the EventUtil object) and you only need one instance of this object, there's no need to define a class. It makes me think that I'm not going about my code correctly.
|