title: Hide/show not working in Internet Explorer
body: <h2>Overview</h2>
  
  <p>I'm creating series of divs with id named "cda2012_#" where # represents the order. They should appear for 8.5 seconds and be replaced by the next div in the sequence. These divs will cycle indefinitely. The script below executes at the bottom of the page, after the divs have loaded.</p>
  
  <h2>Desired Effect</h2>
  
  <p>Specific divs flagged by id will cycle between each other, in order, indefinitely. (Works in FF/Chrome)</p>
  
  <h2>Error in IE9</h2>
  
  <p>First div displays fine but second div won't display, nor will it cycle back to the first div in the sequence.</p>
  
  <p><strong>UDPATE:</strong> The issue in IE9 is that the next div in the sequence doesn't show. In Firefox/Chrome, the divs will cycle indefinitely for 8.5 seconds.</p>
  
  <p><strong>UPDATE 2:</strong> Switch from - to _ in div id and script, per request. Still doesn't pull next div in sequence in IE9.</p>
  
  <p><strong>UPDATE 3:</strong> Updated divs elements being hid to have background colors, per suggestions. This doesn't have an impact on cycling between the divs in IE9.</p>
  
  <p><strong>UPDATE 4:</strong> Encapsulated code using: j(function() {...});</p>
  
  <hr>
  
  <h2>Solution</h2>
  
  <ul>
  <li>Encapsulating code in j(function() {...});</li>
  <li>Switching "-" (hyphen) to "_" (underscore)</li>
  </ul>
  
  <h2>Fixed thanks to input from @Beetroot-Beetroot</h2>
  
  <hr>
  
  <pre><code>&lt;script&gt;
      var divs = j('div[id^="cda2012_"]').hide(),
          i = 0;
  
      (function cycle() { 
          divs.eq(i).fadeIn(450)
              .delay(8500)
              .fadeOut(450, cycle);
  
              i = ++i % divs.length;
      })();
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is an example div that would appear above the script in the HTML:</p>
  
  <pre><code>&lt;div id="cda2012_1"&gt;
      &lt;div id="table-hd"&gt;Project Title&lt;/div&gt;
      &lt;div id="table-bd"&gt;
          &lt;span id="table-q"&gt;
              &lt;img align="middle" alt="" src="http://aiawa.org/associations/12413/files/cda2012-hogue.png" /&gt;
              &lt;hr id="table-hr" /&gt;
              Firm: &lt;a href="http://lmnarchitects.com/" target="_blank"&gt;LMN&lt;/a&gt;&lt;br /&gt;
              Photo: &lt;a href="http://lmnarchitects.com/" target="_blank"&gt;LMN&lt;/a&gt;&lt;/span&gt;&lt;span id="table-v"&gt;&lt;br /&gt;
              &lt;center&gt;
                  &lt;span id="table-h2"&gt;Did you know?&lt;/span&gt;
              &lt;/center&gt;&lt;br /&gt;
              Students and faculty at Central Washington University can assemble wind turbines or test photovoltaic technologies on the &amp;quot;working roof&amp;quot; of their 92,000GSF LEED Platinum facility. &lt;br /&gt;
          &lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>