Search code examples
jquerylinuxapachecycle

jquery cycle plugin doesn't rotate images


I'm trying to use jquery cycle plugin. I directly copied the page source at http://jquery.malsup.com/cycle/basic.html and saved it to a file on my server at http://merlin.ahmct.ucdavis.edu/photolog2/slideshow.html to test functionality.

The malsup site works perfectly for me in Chrome. However, my local file version just shows the 5 images, and doesn't rotate them. I get the same behavior in other browsers. It seems like a server issue to me, but I have no clue what it could be. I'm running apache on linux mint.

Any ideas on how to get the local version running? Thanks in advance.


Solution

  • $(document).ready(function() {
        $('.slideshow').cycle({
            fx: 'fade' // choose your transition type, ex: fade,
    scrollUp, shuffle, etc...   // THIS STUFF IS NOT CODE AND SHOULD BE COMMENTED
        });
    });
    

    should look like:

    $(document).ready(function() {
        $('.slideshow').cycle({
            fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...  
        });
    });
    

    You can easily spot such errors in console,
    If you use FireFox you can download FireBug to inspect any errors thrown by JS, in other browsers you have also some Developer Tools. Get used to that tools if you want to code :)