title: How do I reload jQuery slideshow with jQuery show/hide event?
body: <p>I am using jQuery to show/hide divs on a page. Within each div, I have a jQuery slideshow. The first one works, but upon clicking through to next div, the slider is broken. (see: <a href="http://www.parker-gibson.com/mqm_test/hawkeye_beef.html" rel="nofollow">http://www.parker-gibson.com/mqm_test/hawkeye_beef.html</a>). I am told I need to reload slider after every show/hide event, but I have no idea how. Not very jQuery literate. Thanks for any help!!</p>
  
  <p>Code:</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;link href='http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'&gt;
  &lt;link href='http://fonts.googleapis.com/css?family=Arvo:400,700' rel='stylesheet' type='text/css'&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;Midwest Quality Meats&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" href="css/style.css"&gt;
  &lt;!-- bxSlider CSS file --&gt;
  &lt;link href="css/jquery.bxslider.css" rel="stylesheet" /&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
  &lt;div id="container"&gt;
  
  &lt;div id="top-nav"&gt;
      &lt;nav&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a href="#"&gt;Partners&lt;/a&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="hawkeye.html"&gt;Hawkeye Meats&lt;/a&gt;&lt;/li&gt;
                  &lt;!--&lt;li&gt;&lt;a href="#"&gt;...&lt;/a&gt;&lt;/li&gt;--&gt;
                  &lt;!--&lt;li&gt;&lt;a href="#"&gt;...&lt;/a&gt;&lt;/li&gt;--&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
          &lt;li&gt;&lt;a href="#"&gt;Meats&lt;/a&gt;
              &lt;ul&gt;
                  &lt;li&gt;&lt;a href="beef.html"&gt;Beef&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="pork.html"&gt;Pork&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a href="chicken.html"&gt;Chicken&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/li&gt;
  
          &lt;a href="index.html" style="display:block; float:left; margin:0 95px 0 25px;"&gt;&lt;img src="img/ribbon.png"&gt;&lt;/a&gt;
  
          &lt;li&gt;&lt;a href="#"&gt;About Us&lt;/a&gt;&lt;/li&gt;
          &lt;li style="margin-right:15px;"&gt;&lt;a href="#"&gt;Contact&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/nav&gt;
  &lt;/div&gt; &lt;!--end top nav--&gt;
  
  &lt;div style="clear:both;"&gt;&lt;/div&gt;
  
  &lt;div id="nav spacer" style="width:960px; height:80px;"&gt;
  &lt;/div&gt;
  
  &lt;div id="meat-wrap"&gt;
  
  &lt;div id="cuts-container"&gt;
      &lt;div id="hwk-beef-nav-top"&gt;
      &lt;/div&gt;
      &lt;div id="cuts"&gt;
      &lt;ul&gt;
          &lt;li&gt;&lt;a id="strip_btn" class="buttons"&gt;&lt;h2&gt;New York Strip Steak&lt;/h2&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a id="tbone_btn" class="buttons"&gt;&lt;h2&gt;T-Bone Steak&lt;/h2&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a id="sirloin_btn" class="buttons"&gt;&lt;h2&gt;Top Sirloin Steak&lt;/h2&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a id="filet_btn" class="buttons"&gt;&lt;h2&gt;Sirloin Filet Steak&lt;/h2&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a id="chuck_btn" class="buttons"&gt;&lt;h2&gt;Chuck Steak&lt;/h2&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a id="beefpatty_btn" class="buttons"&gt;&lt;h2&gt;Ground Beef Patty&lt;/h2&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/div&gt;
      &lt;div id="animal-nav"&gt;
      &lt;a href="pork.html"&gt;&lt;div id="pork-nav" style="border-right:1px solid #000;"&gt;&lt;/div&gt;&lt;/a&gt;
      &lt;a href="chicken.html"&gt;&lt;div id="chicken-nav"&gt;&lt;/div&gt;&lt;/a&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;!---------------------new york strip-------------------------&gt;
  &lt;div id="strip"&gt;
  &lt;div id="cut-slider"&gt;
      &lt;ul id="slider1" class="sliders"&gt;
      &lt;li&gt;&lt;img src="img/slider-img/strip1.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/strip-box.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/strip2.jpg" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div id="details"&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;New York Strip Steak&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Breast&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt; &lt;!--end strip--&gt;
  
  &lt;!---------------------t-bone-------------------------&gt;
  &lt;div id="tbone"&gt;
  &lt;div id="cut-slider"&gt;
      &lt;ul id="slider2" class="sliders"&gt;
      &lt;li&gt;&lt;img src="img/slider-img/tbone1.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/tbone-box.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/tbone2.jpg" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div id="details"&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;T-Bone Steak&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Breast&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt; &lt;!--end tbone--&gt;
  
  &lt;!---------------------sirloin-------------------------&gt;
  &lt;div id="sirloin"&gt;
  &lt;div id="cut-slider"&gt;
      &lt;ul id="slider3" class="sliders"&gt;
      &lt;li&gt;&lt;img src="img/slider-img/sirloin1.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/sirloin-box.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/sirloin2.jpg" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div id="details"&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Top Sirloin Steak&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Breast&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt; &lt;!--end sirloin--&gt;
  
  &lt;!---------------------filet-------------------------&gt;
  &lt;div id="filet"&gt;
  &lt;div id="cut-slider"&gt;
      &lt;ul id="slider4" class="sliders"&gt;
      &lt;li&gt;&lt;img src="img/slider-img/filet1.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/filet-box.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/filet2.jpg" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div id="details"&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Sirloin Filet Steak&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Breast&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt; &lt;!--end filet--&gt;
  
  &lt;!---------------------chuck-------------------------&gt;
  &lt;div id="chuck"&gt;
  &lt;div id="cut-slider"&gt;
      &lt;ul id="slider5" class="sliders"&gt;
      &lt;li&gt;&lt;img src="img/slider-img/chuck1.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/chuck-box.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/chuck2.jpg" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div id="details"&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Chuck Steak&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Breast&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt; &lt;!--end chuck--&gt;
  
  &lt;!---------------------beefpatty-------------------------&gt;
  &lt;div id="beefpatty"&gt;
  &lt;div id="cut-slider"&gt;
  &lt;ul id="slider6" class="sliders"&gt;
      &lt;li&gt;&lt;img src="img/slider-img/patty1.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/patty-box.jpg" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;img src="img/slider-img/patty2.jpg" /&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div id="details"&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Ground Beef Patty&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
      &lt;h3&gt;Name of cut:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;Breast&lt;/p&gt;
      &lt;h3&gt;Flavor Profile:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It tastes like chicken. Everything tastes like chicken.&lt;/p&gt;
      &lt;h3&gt;Size:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;10-12 oz&lt;/p&gt;
      &lt;h3&gt;Recommendations:&lt;/h3&gt;
      &lt;p class="detail-copy"&gt;It puts the lotion in the basket, or else it gets the hose again.&lt;/p&gt;
  &lt;/div&gt;
  &lt;/div&gt; &lt;!--end beefpatty--&gt;
  
  &lt;/div&gt; &lt;!--end meat wrap--&gt;
  
  &lt;/div&gt; &lt;!--end container--&gt;
  
  &lt;div id="footer"&gt;&lt;/div&gt;
  
  &lt;!-- jQuery library (served from Google) --&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"&gt;&lt;/script&gt;
  &lt;!-- bxSlider Javascript file --&gt;
  &lt;script src="js/jquery.bxslider.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      jQuery(document).ready(function($) {    
      $('#slider1').bxSlider({
      mode: 'horizontal',
      auto: false,
      autoControls: false,
      pause: 3000,
      useCSS: false
  });
      $('#slider2').bxSlider({
      mode: 'horizontal',
      auto: false,
      autoControls: false,
      pause: 3000,
      useCSS: false
  });
      $('#slider3').bxSlider({
      mode: 'horizontal',
      auto: false,
      autoControls: false,
      pause: 3000,
      useCSS: false
  });
      $('#slider4').bxSlider({
      mode: 'horizontal',
      auto: false,
      autoControls: false,
      pause: 3000,
      useCSS: false
  });
      $('#slider5').bxSlider({
      mode: 'horizontal',
      auto: false,
      autoControls: false,
      pause: 3000,
      useCSS: false
  });
      $('#slider6').bxSlider({
      mode: 'horizontal',
      auto: false,
      autoControls: false,
      pause: 3000,
      useCSS: false
  });
  });
  &lt;/script&gt;
  &lt;!--show/hide effects--&gt;
  &lt;script type = "text/javascript" &gt;
  $(document).ready(function() {
    function hideContent() {
      var l = elements.length;
      while (l--) {
        $('#' + elements[l]).hide();
      }
    }
    var elements = ['strip', 'tbone', 'sirloin', 'filet', 'chuck', 'beefpatty'];
  
    hideContent();
    $('#strip').show();
    $("#strip_btn").addClass('active_btn');
  
  
    $('.buttons').click(function() {
      var page = $(this).attr('id').split('_')[0]; //this gives you the target page id
      hideContent();
      $('.buttons').removeClass('active_btn');
  
      $('#' + page).show();
      $(this).addClass('active_btn');
      $('.sliders').bxSlider().reloadSlider();
    });
  }); 
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>