[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

slide show not working correctly

Posted on 2014-01-04
10
Medium Priority
?
443 Views
Last Modified: 2014-01-05
Check this out: http://www.sharonfarber.com/index2.html

The images in the slide show repeat 1, 3, 1, 2 - it's not in order.  Can you help me to fix it please?

here is the code for the slider:

<section id="container">
    <div id="slideshow"> <img src="images/a_sfSlideweb.jpg" alt="Slideshow Image 1" class="active" /> <img src="images/b_sfSlideweb.jpg" alt="Slideshow Image 2" class="active" /><img src="images/c_sfSlideweb.jpg" alt="Slideshow Image 3" class="active" /><img src="images/d_sfSlideweb.jpg" alt="Slideshow Image 4" class="active" /> <img src=
"images/e_sfSlideweb.jpg" alt="Slideshow Image
5" class="active" /> <img src="images/f_sfSlideweb.jpg" alt="Slideshow Image 6" class="active" /> <img src="images/g_sfSlideweb.jpg" alt="Slideshow Image 7" class="active" /> <img src="images/h_sfSlideweb.jpg" alt="Slideshow Image 8" class="active" /> <img src="images/i_sfSlideweb.jpg" alt="Slideshow Image 9" class="active"/> <img src="images/a_sfSlideweb.jpg" alt="Slideshow Image 10" class="active"/> <img src="images/k_sfSlideweb.jpg" alt="Slideshow Image 11" /></div>
0
Comment
Question by:Revolution9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 2000 total points
ID: 39756520
Remove class="active" from all of the image tags except for the first one.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 39756523
That's the HTML for the images.  The actual slide show code is probably JavaScript...can you post that?
0
 

Author Comment

by:Revolution9
ID: 39756596
I took off the class="active" and thought it was working, then migrated the page to index.html (www.sharonfarber.com) - but it looks like it is not bringing up the second slide (b_sfSlideweb.jpg).  Here is the revised code.

<section id="container">
    <div id="slideshow"> <img src="images/a_sfSlideweb.jpg" alt="Slideshow Image 1" class="active" />
    <img src="images/b_sfSlideweb.jpg" alt="Slideshow Image 2"/>
    <img src="images/c_sfSlideweb.jpg" alt="Slideshow Image 3"/>
    <img src="images/d_sfSlideweb.jpg" alt="Slideshow Image 4"/>
    <img src="images/e_sfSlideweb.jpg" alt="Slideshow Image 5"/>
    <img src="images/f_sfSlideweb.jpg" alt="Slideshow Image 6"/>
    <img src="images/g_sfSlideweb.jpg" alt="Slideshow Image 7"/>
    <img src="images/h_sfSlideweb.jpg" alt="Slideshow Image 8"/>
    <img src="images/i_sfSlideweb.jpg" alt="Slideshow Image 9"/>
    <img src="images/j_sfSlideweb.jpg" alt="Slideshow Image 10"/>
    <img src="images/a_sfSlideweb.jpg" alt="Slideshow Image 11"/></div>
  </section>
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 38

Expert Comment

by:Tom Beck
ID: 39756628
Are you sure about that? I look at the view source for the rendered page at sharonfarbor.com and I see that the first THREE images have class="active".
0
 

Author Comment

by:Revolution9
ID: 39756639
That's weird.  Here is the complete page code.  Maybe you can find out from this what's going on:


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Sharon Farber - Composer</title>
<link rel="image_src" href="http://sharonfarber.com/images/homestudio.jpg" />
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/player-mini.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/js/jquery.jplayer.min.js"></script>
<script type="text/javascript">
function slideSwitch() {
    var $active = $('#slideshow IMG.active');
    if ( $active.length == 0 ) $active = $('#slideshow IMG:last');
    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow IMG:first');
    $active.addClass('last-active');
    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 1000, function() {
            $active.removeClass('active last-active');
        });
}
</script>
<script type="text/javascript">
$(document).ready(function() {
    setInterval( "slideSwitch()", 7000 );
    if (navigator.userAgent.match(/i(Pad|Phone|Pod)/i) != null) {
        $('.volume-bar-holder').remove();
        $('#player-mini').css('width', '235px');
        $('#player-mini').css('margin-right', '30px');
    }
    $('#player-instance').jPlayer({
        ready: function() {
            $(this).jPlayer('setMedia', {'mp3': 'audio/home.mp3', 'oga': 'audio/home.ogg'}).jPlayer("play");
        },
        supplied: 'ogg, mp3',
        solution: 'html, flash',
        wmode: 'window',
        preload: 'metadata',
        swfPath: 'js/Jplayer.swf',
        cssSelectorAncestor: '#player-mini'
    });
});
</script>
</head>
<body>
<div id="wrapper"> 
  <!-- header start -->
  <header>
    <div class="logo_block">
      <h1 class="lefts">Sharon Farber composer</h1>
    <nav>
        <ul>
          <li><a href="index.html" class="active">home</a></li>
          <li><a href="news.html">news</a></li>
          <li><a href="#" >music</a>
            <ul>
              <li><a href="filmgallery.html">film/tv</a></li>
              <li><a href="#">concert</a>
                <ul>
                  <li><a href="orchestral.html">orchestral</a></li>
                  <li><a href="chorale.html">chorale</a></li>
                  <li><a href="artsongs.html">art songs</a></li>
                </ul>
              </li>
              <li><a href="miscellaneous.html">miscellaneous film cues</a> </li>
            </ul>
          </li>
          <li><a href="video.html">video</a></li>
          <li><a href="bio.html">bio</a></li>
          <li><a href="credits.html">credits</a></li>
          <li><a href="gallery.html">gallery</a></li>
          <li><a href="press.html">press</a></li>
          <li><a href="blog.html">blog</a></li>
          <li><a href="store.html">store</a></li>
          <li><a href="contact.html">contact</a>
        </ul>
      </nav>
    </div>
  </header>
  <!-- header end --> 
  <!-- body start -->
  <section id="container">
    <div id="slideshow"> <img src="images/a_sfSlideweb.jpg" alt="Slideshow Image 1" class="active" /> 
    <img src="images/b_sfSlideweb.jpg" alt="Slideshow Image 2"/>
    <img src="images/c_sfSlideweb.jpg" alt="Slideshow Image 3"/>
    <img src="images/d_sfSlideweb.jpg" alt="Slideshow Image 4"/> 
    <img src="images/e_sfSlideweb.jpg" alt="Slideshow Image 5"/> 
    <img src="images/f_sfSlideweb.jpg" alt="Slideshow Image 6"/> 
    <img src="images/g_sfSlideweb.jpg" alt="Slideshow Image 7"/> 
    <img src="images/h_sfSlideweb.jpg" alt="Slideshow Image 8"/> 
    <img src="images/i_sfSlideweb.jpg" alt="Slideshow Image 9"/> 
    <img src="images/j_sfSlideweb.jpg" alt="Slideshow Image 10"/> 
    <img src="images/a_sfSlideweb.jpg" alt="Slideshow Image 11"/></div>
  </section>
  <!-- body end --> 
  <!-- footer start -->
    <footer>
        <span class="copyright lefts">&copy;2014 Sharon Farber  •  Website design by Richard Stellar / <a href="http://www.interstellar9.com/" target="_blank">Interstellar9</a></span>
        <span class="rights">
            <a href="http://www.facebook.com/sharon.farber.9" class="social_link" target="_blank"><img src="images/facebook.png" alt=""></a>
            <a href="https://twitter.com/shashscore" class="social_link" target="_blank"><img src="images/twitter.png" alt=""></a>
            <a href="http://www.linkedin.com/pub/sharon-farber/3/470/642" class="social_link" target="_blank"><img src="images/linkedin.png" alt=""></a>
            <a href="http://www.youtube.com/user/sharonfarbercomposer" class="social_link" target="_blank"><img src="images/you-tube.png" alt=""></a>
            <a href="http://www.imdb.com/name/nm0004283/" class="social_link" target="_blank"><img src="images/imdb.png" alt=""></a>
        </span>
        <div id="player-instance"></div>
        <div style="float: right; margin: 2px 10px 0 0;">
            <div id="player-mini">
                <div class="buttons-holder">
                    <div class="jp-play"></div>
                    <div class="jp-pause"></div>
                </div>
                <div class="bar-holder">
                    <div class="jp-seek-bar"><div class="jp-play-bar"></div></div>
                </div>
                <div class="time-holder">
                    <div class="jp-current-time">00:00</div>
                </div>
                <div class="volume-bar-holder">
                    <div class="jp-volume-bar"><div class="jp-volume-bar-value"></div></div>
                </div>
            </div>
        </div>
        <span id="audio_player" style="width: 0px;"></span>
    </footer>
  <!-- footer end --> 
</div>
</body>
</html>

Open in new window

0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39756641
This file is missing http://www.sharonfarber.com/images/e_sfSlideweb.jpg and that may mess things up.   Try adding it and see if that works.

Otherwise, looking at the console as it looks like the js must be taking care of the "active"
0
 

Author Comment

by:Revolution9
ID: 39756646
I did, but it still appears that the images are not in order.  Thanks so much for your help.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39756668
It seems to work for me.  Your first and last slide are the exact same image.  The 4th(d) and 10th(j) are very similar
0
 
LVL 38

Expert Comment

by:Tom Beck
ID: 39756801
Looks like it's working fine although the last slide should be "k" instead of "a". Then it will appear to run smoothly with equal amount of time spent at each slide. If you watch the slides change on the HTML tab in Firebug you will see that they are changing in perfect order.
0
 

Author Closing Comment

by:Revolution9
ID: 39757382
thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question