开发者

Why does my webpage freeze up?

I am loading a part of my site using jQuery's load function.

Everything works great, except for the fact that ever since I added the load function, my page freezes for 3-4 seconds during the loading.

I have been unable to find out what is causing this exactly... A开发者_开发百科ny ideas?

My webpage can be found here.

Thanks!


There might be other issues but the first thing I noticed in FireBug is you have a script error:

jQuery is not defined: jQuery(this).css('marginLeft', -width/2);

This seems to be coming from selectToUISlider.JQuery.js

I would start by fixing this and see if you still hang. Might be unrelated but hard to tell while there are existing script errors.


The reason your web page is "freezing" is because you are doing lots and lots of control initialization and some of it is slow.

On my computer it will eventually finish.

You could put in hidden timers to find out exactly where in the slowest parts are.

Also, looking chrome debugger I can see this request http://www.funcampuses.com/wizard/false it taking a very long time.


My problem was that I was calling a custom function for calculating the width of an invisible item. I was doing that for every label (average of ~10) in each slider (~40).
Obviously, this was very bad!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜