17523934 * jQuery 코어 수정을 되돌리고, 별도의 파일로 작성, 로드

* jQuery 1.2.6 버전에만 반영하도록 설정
  * jQuery 1.3 교체시 제거 대상

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@5078 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
bnu 2008-12-15 05:27:46 +00:00
parent 8e35ce998f
commit 6fa6782fd0
3 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,31 @@
/*
* jQuery 1.2.6
* Opera 브라우저에서 $(window).height() / width() 값을 잘못 가져오는 문제 수정
* jQuery 1.3에서 수정되었음
* @link http://dev.jquery.com/changeset/5938
*/
if(jQuery.fn.jquery == '1.2.6') {
jQuery.each([ "Height", "Width" ], function(i, name){
var type = name.toLowerCase();
jQuery.fn[ type ] = function( size ) {
return this[0] == window ?
// Opera 브라우저에서 $(window).height() / width() 값을 잘못 가져오는 문제 수정
jQuery.browser.opera && document.body.parentNode[ "client" + name ] ||
jQuery.browser.safari && window[ "inner" + name ] ||
document.compatMode == "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ] :
this[0] == document ?
Math.max(
Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]),
Math.max(document.body["offset" + name], document.documentElement["offset" + name])
) :
size == undefined ?
(this.length ? jQuery.css( this[0], type ) : null) :
this.css( type, size.constructor == String ? size : size + "px" );
};
});
}

View file

@ -1339,7 +1339,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){
// Get window width or height
return this[0] == window ?
// Opera reports document.body.client[Width/Height] properly in both quirks and standards
jQuery.browser.opera && document.body.parentNode[ "client" + name ] ||
jQuery.browser.opera && document.body[ "client" + name ] ||
// Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths)
jQuery.browser.safari && window[ "inner" + name ] ||