GETBOUNDINGCLIENTRECT CAUSES 'UNSPECIFIED ERROR' IN IE7 AFTER AJAX in Jquery 1.4.2
2011-12-15 05:02
477 查看
/*By Jiangong SUN*/
This problem occurs when we calculate the offset for hidden div in ajax in our project. It's produced in IE 7.
Here is the solution :
In jquery.1.4.2.js,
replace :
with :
In jquery.1.4.2.min.js,
replace :
with :
Enjoy coding !
This problem occurs when we calculate the offset for hidden div in ajax in our project. It's produced in IE 7.
Here is the solution :
In jquery.1.4.2.js,
replace :
var box = elem.getBoundingClientRect(),
with :
var box = null; try { box = elem.getBoundingClientRect(); } catch(e) { box = { top : elem.offsetTop, left : elem.offsetLeft } };
In jquery.1.4.2.min.js,
replace :
var d=b.getBoundingClientRect(),
with :
try{var d=b.getBoundingClientRect();}catch(ex){var d={top:0,left:0,right:0,bottom:0};}
Enjoy coding !
相关文章推荐
- error: unknown field 'ioctl' specified in initializer问题
- erlang nif windows x64 Failed to load NIF library : 'Unspecified error'
- error: unknown field 'ioctl' specified in initializer (1)
- [Nagios] Error: Template 'timman' specified in contact definition could not be not found (c
- 解决 error: unknown field 'ioctl' specified in initializer 的一种方法
- error: unknown field 'ioctl' specified in initializer
- Windows Installer Cleanup卸载清理错误提示:Run-time error '-2147024882 (8007000e)' System Error &H80004005 (-2147467259). Unspecified er
- error:unknown field 'ioctl' specified in initializer
- [Nagios] Error: Template 'timman' specified in contact definition could not be not found (c
- [Nagios] Error: Template 'timman' specified in contact definition could not be not found (c
- error:unknown field 'ioctl' specified in initializer
- yaffs,linux3.11,内核编译时报错, error: unknown field 'readdir' specified in initializer
- 当使用JQuery的"$",抛异常Uncaught TypeError: Object #<Object> has no method 'ajax'
- error: unknown field 'ioctl' specified in initializer问题
- error: unknown field 'ioctl' specified in initializer问题
- Error:Cause: failed to find target with hash string 'N' in: F:\Androidstudio\android-sdk-windows <a
- ERROR: tried to execute code in unprepared class 'XXXX'
- UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-4: ordinal not in range(128)
- UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-15: ordinal not in range(128
- No configuration found for the specified action: '/myNameSpace/login.action' in namespace: ''. Form