title: jQuery / JS - IE Error - Object doesn't support property or method 'hasClass'
body: <p>I am getting this error in IE 11 but no other browsers, seems like simple code but maybe I am missing something?  Below is a sample of the code.  Note I can replace parent. with the selector and it works fine.</p>
  
  <pre><code>$('.hs-search input[type="submit"]').click(function(){
  
      parent = $('.header-search');
  
      if(parent.hasClass('active')){
          return true;
      }else{
          parent.addClass('active');
          return false;
      }
  });
  </code></pre>
  
  <p>And here is a sample of the garbage markup being generated.</p>
  
  <pre><code>&lt;div class="header-search"&gt;
      &lt;div class="hs-search"&gt;
          &lt;div id="ctl00_header1_SearchInput1_pnlSearch" class="searchpanel " onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_header1_SearchInput1_btnSearch')" style="display:inline;"&gt;
              &lt;input onfocus="javascript:watermarkEnter(this, 'Search');" onblur="javascript:watermarkLeave(this, 'Search');" name="ctl00$header1$SearchInput1$txtSearch" type="text" id="ctl00_header1_SearchInput1_txtSearch" title="Site Search" class=" " style="display: none;"&gt;
              &lt;input type="submit" name="ctl00$header1$SearchInput1$btnSearch" value="search" id="ctl00_header1_SearchInput1_btnSearch"&gt;
          &lt;/div&gt;
      &lt;/div&gt; 
  &lt;/div&gt;
  </code></pre>