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: '' });

 

即可,有很大的性能提升

你可能感兴趣的:(jquery,exception,UI,image,IE,performance)