Displaying 2 results from an estimated 2 matches for "getleft".
2005 Dec 15
1
Some handy methods - perhaps cool enough to be committed some time
...}
this.getTop=function(){
return this.position.y;
}
this.getRight=function(){
return this.position.x+this.size.width-1;
}
this.getBottom=function(){
return this.position.y+this.size.height-1;
}
this.getLeft=function(){
return this.position.x;
}
}
}
/******************************************************
* Geometric functions
******************************************************/
Object.extend(Element, {
getPosition: function(element) {
element=$(element);...
2006 Nov 28
11
Extending Element with getTop, getWidth, getLeft problem
Hi,
I need to extend the Element object with getTop, getWidth, getLeft .
I wrote something like this in an js file and loaded it after the
prototype.js .
----------------------------------------------------
Object.extend(Element, {
getWidth: function(element) {
element = $(element);
return element.offsetWidth;
},
getTop: function(element) {
element...