title: IE Error : Unable to set value of the property 'style': object is null or undefined
body: <p>I can't use JQuery for this, yet I can't find a way to fix my code for IE8. It works well in all other browsers (and works for IE9+).</p>
  
  <p>This is a banner rotator and it stops working at the line to hide the banner that's visible.</p>
  
  <pre><code>var bannerRotation = setInterval(function () {
      var img = document.querySelectorAll('#contentBannerRotator img');
      var banner = document.querySelectorAll('#contentBannerRotator a[style="display: block;"]');
      if (!banner || banner.length &lt; 1) 
          var banner = document.querySelectorAll('#contentBannerRotator a[style="display:block;"]');
  
      banner[0].style.display = "none"; /* This is where the error occurs */
  
      var rand = Math.floor(Math.random() * img.length);
      img[rand].parentNode.style.display = "block";
  }, 30000);
  </code></pre>
  
  <p>It seems like IE8 can't find a match to the query selector.</p>
  
  <p>You can see the <a href="http://www.cablevision.qc.ca/fr/index.php?option=com_content&amp;view=article&amp;id=193&amp;Itemid=226" rel="nofollow">error live here</a>.</p>
  
  <p><strong>EDIT:</strong> The document is not going in Quirks mode, so the <code>querySelectorAll</code> method is supposed to work fine.</p>