hi there.
I've had some problems making a javascript object wich structure is similar to this one:
- function colorDiv(div){
- this.div=div;
- this.div.bind("click",this.changeColor)
- this.changeColor(){
- this.div.css("background", "#FF0000");
- }
- }
When I call the colorDiv method 'changeColor()' it works fine because 'this' points to the colorDiv object, but when I call that method from the bind jQuery method, 'this' becomes the div that I'm working on. Do you see any solutions?