We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10279
    • 19 Posts
    Fullthrottle_Designs Reply #1, 17 years, 2 months ago
    I am working on a slideshow for a website but I cannot figure out the Javascript. I need to make a .jpg slideshow instead of a flash movie for acessability reasons. http://www.disability.gov has recently redone their website and have almost exactly what I am trying to accomplish on the homepage.

    This is what I have for the code:

    <div id="slideshow">
      <span id="pics">
        <h1><img src="images/slideshow/image1.jpg" height="380" width="540" alt="Training and Technical Resource Center." /></h1>
      </span>
      <a href="/[~12~]"><img src="images/check_it_out.gif" alt="Check it out" /></a>
    </div>
    <script type="text/javascript">
      if(pageStyle.getPageStyle() == 'Default') {
        var imageTemplate = '<img src="$1" height="340" width="510" alt="" />'
        var images = ['/images/slideshow/image1.jpg','/images/slideshow/image2.jpg','/images/slideshow/image3.jpg','/images/slideshow/image4.jpg','/images/slideshow/image5.jpg','/images/slideshow/image6.jpg','/images/slideshow/image7.jpg'];
        var imageSrc = "";
        
        for (var i=1; i < images.length; i++) {
          imageSrc += imageTemplate.replace('$1', images[i]);
        }
        $('#pics').append(imageSrc);
        $('#pics').cycle({timeout: 7000, autostop: 1, autostopCount: images.length+1});
      }
    </script>

      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Have you looked into using something like this: http://malsup.com/jquery/cycle/int2.html
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 10279
        • 19 Posts
        Fullthrottle_Designs Reply #3, 17 years, 2 months ago
        I will look into those, I appreciate the link!! grin