开发者

FireFox performance problems with a particular jQuery enabled site

开发者 https://www.devze.com 2022-12-11 05:39 出处:网络
I built my first site with jQuery and overall it turned out quite well - in most browsers, that is.You can see the site\'s test environment here.

I built my first site with jQuery and overall it turned out quite well - in most browsers, that is. You can see the site's test environment here.

Much to my surprise, it works great in IE, Chrome, Safari and Opera - but it pretty much sucks in FireFox. I'm using a basic slideshow, a hand-coded horizontal accordion, some little popup boxes, various little effects, and the jQuery LightBox plugin. All of my code is viewable here.

The biggest and most glaring FireFox problem is the accordion - when it slides, it's fairly smooth, but there are tons of artifacts. I have actually reduced the visual artifacts from what they were by setting the content that's hidden to display: none;.

If I am making some noob mistake, please embarrass me and point it out. I am open to just about any suggestions, so long as you don't tell me I have to change the features - my client is already set on those because my boss promised them (before asking if I could im开发者_高级运维plement them, of course).


It seems that the transparent text boxes (whose movement is causing the artifacts, right?) are entirely within their respective accordion page in IE, but they overlap the page in FF. I have no idea why that is (and no time to look through the code right now) but maybe a "overflow: hidden" in the right place is enough already.


First guess - width and height in <img> tags.

It is a common cause for many distortions associated with JS.

Use CSS properties (width and height (sic)) instead

P.S. Set Options -Indexes to your .htaccess on dev server root


In the end, it was a combination of things. The divs with overflow inside the accordion caused a lot of the trouble and some slowdown. Some images without dimensions were also producing artifacts and slowdown. Thanks to all for the help and comments.

0

精彩评论

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