You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
524 B
22 lines
524 B
/**
|
|
* mui layout(offset[,position,width,height...])
|
|
* @param {type} $
|
|
* @param {type} window
|
|
* @param {type} undefined
|
|
* @returns {undefined}
|
|
*/
|
|
(function($, window, undefined) {
|
|
$.offset = function(element) {
|
|
var box = {
|
|
top : 0,
|
|
left : 0
|
|
};
|
|
if ( typeof element.getBoundingClientRect !== undefined) {
|
|
box = element.getBoundingClientRect();
|
|
}
|
|
return {
|
|
top : box.top + window.pageYOffset - element.clientTop,
|
|
left : box.left + window.pageXOffset - element.clientLeft
|
|
};
|
|
};
|
|
})(mui, window);
|