jQuery UI DatePicker IE 6 非常慢的解决方法

最近使用MVC2来开发SVG的GIS程序使用到了datepicker,使用了jQuery UI Datepicker组件,但是效果特别慢(在IE6中使用)由于客户使用IE6。没有办法,好像其他的浏览器没有这么慢。

下面是找到的解决办法:

http://stackoverflow.com/questions/2991439/jquery-ui-datepicker-performance

 

I also ran into this problem. Here are a couple of things that can help performance in IE6:

Turn on background image caching. This will load images before the datepicker is shown:
try {
    document.execCommand("BackgroundImageCache", false, true);
} catch(exception) {
    // other browsers do nothing
}

Turn off animations. Things won't look as nice, but performance is what matters:
$("#datepicker").datepicker( { showAnim: '' });

These seemed to help a bit for me. There may be other small tweaks you can do also.

 

类似翻译:

1.执行document.execCommand("BackgroundImageCache", false, true); 关闭background image缓存。在datepicker显示前调用

 

2.关闭动画效果$("#datepicker").datepicker( { showAnim: '' });

 

即可,有很大的性能提升

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值