title: JQuery, hide() not working but remove() is
body: <p>I'm using JQuery UI tabs and I'm trying to hide the corresponding tab and div when they click the 'X' on the tab. It is hiding the tab properly; however for some reason it does not hide the div. </p>
  
  <pre><code>function hideTab(element){
    $(element).parent().hide();
    $($(element).parent().attr('href')).hide() // hide() is not working on this line
  }
  </code></pre>
  
  <p>Does anybody know why this is? Here is the codepen : <a href="https://codepen.io/anon/pen/eaLmNg" rel="nofollow noreferrer">https://codepen.io/anon/pen/eaLmNg</a></p>
  
  <p>Thanks!</p>