title: Why does jquery hide not work properly in IE7?
body: <p>I have a popup containing different div bodies, one which shows according to button pressed.
  The function below works in IE7:</p>
  
  <pre><code>function openPopup(popupDiv){
      //The popup is a div with id name popupDiv
      //It contains several bodies such as
      //alertPopupDiv, uploadPopupDiv, removePopupDiv
      //The div id name of the body to show is passed to the function
  
      //First hide all the bodies
      $("#popupDiv div[id$=PopupDiv]").each(function (i)
       {this.style.visibility='hidden';});  
  
      //Now show the relevant div
      var div = document.getElementById(popupDiv);
      if(div != null)
        {div.style.visibility = 'visible';}
  
     //Now call the function to load the popup itself          
     loadPopup();
  }
  </code></pre>
  
  <p>But ideally I would have like to use the much simpler:</p>
  
  <pre><code>function openPopup(popupDiv){
      $("div[id$=PopupDiv]").hide();  
  
      $(popupDiv).show();
  
     loadPopup();
  }
  </code></pre>
  
  <p>Which is fine in Firefox and IE8, but doesn't work in IE7 (it works first time it is called, but if the function is calls open the popup with a new container, it fails to render properly.</p>