jsor / jcarousel

Riding carousels with jQuery.
https://sorgalla.com/jcarousel/
MIT License
1.99k stars 736 forks source link

jCarousel working in all browsers, except IE #796

Closed MarkSyred closed 8 years ago

MarkSyred commented 8 years ago

Hi there,

I wonder if anybody can help.

I'm currently involved in the development of a website that has two responsive jCarousels working on it. The content of the first is generated by php so loads in before the rest of the content on the page. The content of the second is loaded in via Javascript and so is loaded in later. Everything works fine, except in IE. In this browser, although the content loads in fine, the controls for it do something quite strange. And it seems to be caused by the delay we've had to put on the responsive control of the jCarousel to prevent a javascript error from cropping up.

To see the problem in action, please visit the site http://sypotest12.co.uk and scroll down to Latest News | Upcoming Events near the footer.

Has anyone come across a similar issue, or know of a way of delaying the responsive control in a way that will not stop it working?

Any help that anyone can provide would be most helpful. And, if you need me to share any code that we're using then just ask.

With kind regards,

Mark

jsor commented 8 years ago

I guess the problem is, that the carousel is hidden during the initialization. Could you try to reload the carousel after it became visible? Something like:

$('#events').show();
$('.jcarousel2').jcarousel('reload');
MarkSyred commented 8 years ago

Thank-you very much for your help. You've clearly spent a bit of time to look into this for me.

Copying in the reload instruction fixed it. Brilliant. I will be continuing to make use of jCarousel in my work.