On Jul 14, 2007, at 1:32 PM, Tobie Langel wrote:
> I'm failing to see what advantage it has over directly storing a
> reference to the element like so:
>
> this.myElement = $(e);
> ...
> var e = this.myElement;
I'm using a similar technique in a couple of applications where I
needed to cache
Hi,
I'm failing to see what advantage it has over directly storing a
reference to the element like so:
this.myElement = $(e);
...
var e = this.myElement;
Regards,
Tobie
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
function Cat(){
this.color = "yellow";
}
Cat.prototype.showColor = function(){
alert(this.color)
}
Cat.prototype.init(){
Event.observe("button", "click", this.showColor.bind(this));
}
Will work just fine :) the problem is that when you assign action to a
button the scope of the fun
Jeff Watkins wrote:
> ...
> Element.Methods.assignId = function(element) {
> element= $(element);
> if (!element.id)
> element.id= "uniqeId_" + (arguments.callee._nextUniqueId++);
> return element.id;
> }
> Element.Methods.assignId._nextUniqueId=0;
> ...
+1 for such an addition. It is especially u