开发者

jQuery sortable very slow in IE8

I've appended a sortable jQuery plugin to my list of divs using 1.4.1 jQuery. The function that is called on the page load is pretty simple.

$(function()
{ 
 $('#d开发者_StackOverflow社区ivEditFieldOrderModal_FieldList').sortable(
 {
  axis: 'y',
  cursor: 'pointer',
  placeholder: 'sortOrderPlaceholder'
 });
});

This divEditFieldOrderModal_FieldList contains something like 20 items, each div has a small text string inside, nothing special. Running this page in FF or Chrome i see that everything runs smoothly, no troubles. But when i try the same thing in IE8 (without compatibility mode) everything goes so slow that the mouse is hardly moving.

When trying to profile JS with embedded profiler i see that the function called 'data' contains the biggest value in 'Exclusive time' column. I profiled for 2secs approximately, moving one item from bottom to the top of the list.

data Count:5 399     Exclusive time:124,00

BTW, i tested the sortable plugin official examples in IE8, everything is running fast and perfect. Surely my page is more loaded with controls and tables then the examples...

Maybe someone knows what can cause this problem in IE8 and what can I do about it?

P.S.: It runs smoothly in IE7 compatibility mode.


Well if it works fine in IE7 and you are developing to support IE7 anyhow why not jsut force IE7 compat mode with an HTTP header or Meta Tag? Granted its sort of an "avoidance" strategy, but personally why waste time if you dont have to?

That said itd be interesting to get a diagnosis. Can you post your code?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜