Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    May 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    jcarousel clashing with slideshow script

    Hi,

    I am running the Ultimate Fade-in slideshow that utilises Jquery, alongside the jcarousel plug-in for Jquery.

    When i run them separately they work fine, but put together on the same page and they are not running. I have tried placing the scripts in different orders in the head with no joy.

    carousel on it's own - http://www.dave-tyle...t/carousel.html

    Fade-in on it's own - http://www.dave-tyler.co.uk/test/fadeslideshow.html

    Together - http://www.dave-tyler.co.uk/test/bothscripts.html

    The code in the head section is:

    <head>

    <link href="css/maintest.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    <!--CAROUSEL SCRIPT-->
    <script type="text/javascript" src="js/jCarouselLite.js"></script>
    <script type="text/javascript">

    $(document).ready(
    function(){
    $(".carousel").jCarouselLite({
    auto: 1500,
    speed: 3000
    });
    });
    </script>

    <!--FADE SLIDESHOW SCRIPT-->
    <script type="text/javascript" src="js/fadeslideshow.js"></script>
    <script type="text/javascript">

    var mygallery=new fadeSlideShow({
    wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    dimensions: [364, 274], //width/height of gallery in pixels. Should reflect dimensions of largest image
    imagearray: [
    ["images/sale2.jpg", "", "", "" ],
    ["images/sale2.jpg", "", "", "" ],
    ["images/sale3.jpg", "", "", ""],
    ["images/sale4.jpg", "", "", ""] //<--no trailing comma after very last image element!
    ],
    displaymode: {type:'auto', pause:3000, cycles:0, wraparound:false},
    persist: false, //remember last viewed slide and recall within same session?
    fadeduration: 500, //transition duration (milliseconds)
    descreveal: "always",
    togglerid: ""
    })

    </script>


    </head>

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    You need Firebug. That would have shown you straight away that the page with both scripts on is producing an error:

    $ is not a function

    The fadeslideshow script is calling jQuery.noConflict(), which stops the $() shorthand being available. Update the relevant bits of the carousel code so it uses jQuery() rather than $() and you may have more luck.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •