Hi,

I have done a fair bit of searching and can't quite find anything that
suits my issue :(  I have been trying to make a gallery using the
cycle plugin's pager function within a jcarousel.  I have managed to
get it working, without too much of a problem, except that the images
are pretty large, which meant there was a flicker of the slides before
the cycle started working.  I tried to overcome this problem by
absolutely placing the slides which seems to have worked, but there is
now a mad flicker of the images all in place.

My thoughts on this are to try and preload the images for the slides,
or at least dynamically load them, but this obviously seriously
hinders the jcarousel part of the gallery, as all the thumbs (or pager
elements) need to be loaded at the start, hence my problem.

I have also tried preloading the images into the cache on the home
page, in the hope that this would speed up load time of the cycle, but
to no avail.  I am really really stuck and would be very grateful if
anybody has any ideas?!?  for reference the gallery is here...

http://www.rsbproperty.co.uk/gallery/

and my code....

/**
 * assign functionality to the external controls
 */
function mycarousel_initCallback(carousel) {
    jQuery('#mycarousel-next').bind('click', function() {
        carousel.next();
        return false;
    });

    jQuery('#mycarousel-prev').bind('click', function() {
        carousel.prev();
        return false;
    });
};

// Ride the carousel...
jQuery(document).ready(function() {

 // homepage cycles
    $('#main_image').cycle({
        fx:'fade',
        timeout:    0,
        slideExpr: '.bigimg',
        pager:      '#gallery_pager',
        pagerAnchorBuilder: function(idx, slide) {

            return '<li><a href="#"><img src="'+slide.title+'"
class="thumb"><span></span></a></li>';
        }

    });

    jQuery("#mycarousel").jcarousel({
        scroll: 7,
        initCallback: mycarousel_initCallback,
        // This tells jCarousel NOT to autobuild prev/next buttons
        buttonNextHTML: null,
        buttonPrevHTML: null
    });
});

Thank you very much in advance for any ideas!!

Cheers

Marc

Reply via email to