title: jQuery Adding text under images
body: <p>I would like some guidance as to how to make the text display underneath my images. Each image must have a text display. I want it to show the next <code>&lt;img&gt;</code> when I hit the Next Graphic <code>&lt;button&gt;</code>. For some reason it is showing both images side by side then going to the next graphic. Maybe there is something I missed when the code was modified. Below is the jQuery and html. Thank you in advance for your help and guidance. </p>
  
  <p>Create an X/HTML document which displays an initial graphic and a form-like button which displays "Next Graphic".</p>
  
  <p>A visible descriptive paragraph about the graphic.  You may use any graphic that you like.</p>
  
  <p>When the user clicks on the button, a different graphic will display with a different descriptive paragraph.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
  
      $("#imgNext").click(function() {
           var $curr = $('.slideshow img:visible'),
           $next = ($curr.next().length) ? $curr.next() : $('.slideshow img').first();
           $next.css('z-index',2).fadeIn('slow', function() {
           $curr.hide().css('z-index',0);
           $next.css('z-index',1);
          });
      });
  
  });
  &lt;/script&gt;
  
  &lt;div id ="text_slider"&gt;
  
  &lt;div/&gt;
  &lt;button src="spi/spi2.jpg" width="50" height="50" id="imgNext"&gt;Next Graphic&lt;/button&gt;
  &lt;br /&gt;
  &lt;div class="slideshow"&gt;
      &lt;img class="slider_image" id="1" src="spi/spi1.jpg"&gt;
      &lt;p&gt;This is South Padre Island Texas. I grew up going every summer since I can remember.&lt;/p&gt;
  
      &lt;img class="slider_image" id="2" src="spi/spi2.jpg"&gt;
      &lt;p&gt;This is the beautiful beaches of South Padre Island. &lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>