Skip to content
Snippets Groups Projects
Commit 0589eb71 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

deprecated findPosX and findPosY

parent 98becf95
No related branches found
No related tags found
No related merge requests found
......@@ -12,3 +12,14 @@ var ajax_quicksearch = {
clear_results: DEPRECATED_WRAP(dw_qsearch.clear_results, dw_qsearch),
onCompletion: DEPRECATED_WRAP(dw_qsearch.onCompletion, dw_qsearch)
};
function findPosX(object){
DEPRECATED('Use jQuery.position() instead');
return jQuery(object).position().left;
}
function findPosY(object){
DEPRECATED('Use jQuery.position() instead');
return jQuery(object).position().top;
}
......@@ -123,45 +123,6 @@ function getElementsByClass(searchClass,node,tag) {
return classElements;
}
/**
* Get the X offset of the top left corner of the given object
*
* @link http://www.quirksmode.org/js/findpos.html
*/
function findPosX(object){
var curleft = 0;
var obj = $(object);
if (obj.offsetParent){
do {
curleft += obj.offsetLeft;
} while (obj = obj.offsetParent);
}
else if (obj.x){
curleft += obj.x;
}
return curleft;
} //end findPosX function
/**
* Get the Y offset of the top left corner of the given object
*
* @link http://www.quirksmode.org/js/findpos.html
*/
function findPosY(object){
var curtop = 0;
var obj = $(object);
if (obj.offsetParent){
do {
curtop += obj.offsetTop;
} while (obj = obj.offsetParent);
}
else if (obj.y){
curtop += obj.y;
}
return curtop;
} //end findPosY function
/**
* Get the computed style of a node.
*
* @link https://acidmartin.wordpress.com/2008/08/26/style-get-any-css-property-value-of-an-object/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment