Unstyled content when loading

his_dudeness - July 27, 2009 - 23:29
Project:jCarousel
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

please just look at http://www.marke41.de/aktuell
you'll see the not very nice "stairs effect" of the pictures in the carousel on the top, while the page is loading. (happens only first time loading the page.) do "shift & reload" to repeat the effect.

by the way, i'm using "views carousel" on this.

any ideas how i could avoid this?

#1

his_dudeness - July 28, 2009 - 01:22
Title:unstyled content in IE7» unstyled content

oups ... it's not only in IE7, but also in safari.

#2

his_dudeness - July 29, 2009 - 00:55
Assigned to:his_dudeness» Anonymous

#3

Rob Loach - August 6, 2009 - 21:51
Title:unstyled content» Unstyled content when loading
Version:6.x-1.1» 6.x-1.x-dev
Status:active» needs work

Not sure how we can avoid this as the jCarousel doesn't get applied until jCarousel is activated on the elements. If you take a look at the jcarousel examples, you'll see it happen there too.... Maybe if you stick some custom CSS in to apply on the un-processed jCarousel elements?

#4

nedjo - August 8, 2009 - 13:44
Status:needs work» needs review

This could be fixed by use of the js-hide class defined in system.css.

Here's an untested patch.

AttachmentSize
jcarousel-hide-532748-4.patch 1.53 KB

#5

GregSims - August 28, 2009 - 21:33

I added the js-hide class to the ul container for a carousel I built resulting in class="js-hide jcarousel-skin-tango" on the ul. The result was nothing visible inside the carousel even after the page completly loads.

Perhaps there is something I'm missing here.

#6

kbasarab - November 3, 2009 - 21:34

@GregSims

It worked perfectly for me but I did do something a little different then the patch.

Currently the patch is:
+ $(selector + ':not(.jcarousel-processed)').show().addClass('jcarousel-processed' + skin).jcarousel(options);

I changed it to:
+ $(selector + ':not(.jcarousel-processed)').removeClass('js-hide').addClass('jcarousel-processed' + skin).jcarousel(options);

That worked like a champ for me.

#7

Rob Loach - November 5, 2009 - 23:08
Status:needs review» fixed

Committed to DRUPAL-6--1.

#8

System Message - November 19, 2009 - 23:10
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.