开发者

Slide Deck not displaying properly in Google Chrome

开发者 https://www.devze.com 2023-03-21 00:36 出处:网络
I have installed the free version of Slide Deck, a jQuery slider on a Wordpress website. It displays fine in Internet Explorer 8 and Firefox 5, but does not slide or display properly in Google Chrome

I have installed the free version of Slide Deck, a jQuery slider on a Wordpress website.

It displays fine in Internet Explorer 8 and Firefox 5, but does not slide or display properly in Google Chrome.

In Chrome, the slider merges into the content below it.

In IE8 & FF5, there is empty space below the slider corresp开发者_运维技巧onding to where the images would normally be displayed if they were not in the slider.

Slide Deck not displaying properly in Google Chrome

(the contact info displays below the image in IE8 and FF5, not overlayed as with Chrome)

If I place the slider inside a div with a height equal to the height of 1 image, it fixes the empty space in IE8 & FF5, but doubles the problem in Chrome.

Slide Deck not displaying properly in Google Chrome

Any ideas why Chrome doesn't like this?


It actually works absolutely fine if you access the site again.

The reason for the above behaviour is that slider script ($('.slidedeck')...) simply not get initialized. It's the same as if JavaScript is disabled.

If you check Console panel in Google Chrome's Developer tools, you will see this kind of message:

Unsafe JavaScript attempt to access frame with URL http://s7.addthis.com/static/r07/sh46.html#iit=1311067124513&cb=0&ab=-&dh=www.louisbaxters.com.au&dr=&du=http%3A%2F%2Fwww.louisbaxters.com.au%2F&dt=Louis%20Baxter%C2%A0%7C%C2%A0Coffee%20in%20Subiaco&inst=1&lng=en-GB&pc=wpp&pub=ra-4e25011e4930aecb&ssl=0&sid=4e254bf4fe18466d&srd=1&srf=0.02&srp=0.2&srx=0.5&ver=250&xck=0&rev=102311&ct=1&xd=1 from frame with URL http://www.louisbaxters.com.au/. Domains, protocols and ports must match.

It looks like this error prevents slider from working in Chrome.

If I visit the same page once again I see no such message in Console and slider works fine.

What I would suggest, is to move your slider initialization code inside $(document).ready(function(){ ... }); instead of having it executed in the middle of the page.

0

精彩评论

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