
Untitled
By: a guest on
Jul 4th, 2012 | syntax:
None | size: 1.18 KB | hits: 11 | expires: Never
Is $(document.body) and document.body the same? Cleaning garbage and binding in class? - MooTools 1.3
this.css = null;
window.addEvent('domready', function(){
this.document = $(document);
this.body = $(document.body);
this.head = $(document.head);
}.bind(this));
this.css = null; // Maybe this.css = '' - empty string?
window.addEvent() // or should I use $(window).addEvent()
this.document = $(document) // or this.document = document
this.body = $(document.body) // or this.body = document.body
(function(){
this.setStyle('overflow-y', 'visible');
}.bind(this.body)).delay(100);
(function(){
this.body.setStyle('overflow-y', 'visible');
}.bind(this)).delay(100);
myElement.destroy();
window.addEvent(); // is fine.
document.body.adopt(new Element("div")); // not fine in IE.
new Element("div").inject(document.body); // fine.
$(document.body).adopt(new Element("div")); // fine.
document.body.adopt(new Element("span")); // now fine, after first $.
(function(){
this.setStyle('background', 'blue');
}).delay(100, $("foo"));
(function(){
this.element.setStyle('background', 'blue');
this.someMethod();
}).delay(100, this));