treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Problem with jquery fader

  • Hi everyone.

    Hopefully this is a simple fix. My friends site www.autodentz.co.uk has a Jquery image fader (just 3 images) on the right on the home page. It seems to work fine in Firefox on my mac but for some reason on Chrome it doesnt load the full size of the images.

    Can anyone help me please. Im very new to Jquery !!

    The site again is

    www.autodentz.co.uk

    Thanks in advance
  • Hi Hal8!

    The problem is Chrome is too fast LOL. It runs the plugin before all of the images are loaded, so all you need to do is switch the document.ready to window.load. Oh and there is an extra comma after the "pause: 1" that will make IE throw a fit, so remove that too.
    $(window).load(function() {
    $("#slideshow").css("overflow", "hidden");

    $("ul#slides").cycle({
    fx: 'fade',
    pause: 1
    });

    $("#slideshow").hover(function() {
    $("ul#slides").fadeIn(100000);
    }, function() {
    $("ul#slides").fadeOut(100000);
    });
    });
  • Hi Mottie

    Thanks you very much....that did the trick