title: JQuery - Object doesn't support property or method toLowerCase
body: <p>I've been struggling with this problem for a week now. This is the situation:<br>
  I've been working on moving a SharePoint application out of SharePoint and as it's own website. Our SharePoint version is 2007 and we need to upgrade it. So my boss has asked me to move this out.</p>
  
  <p>I already worked on one SharePoint application, made it its' own website, it works fine. But this one is causing me so much trouble! </p>
  
  <p>I get this error EVERY TIME I run the program:
  <a href="https://i.stack.imgur.com/OMpWn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OMpWn.png" alt="enter image description here"></a></p>
  
  <p>This is not like any thing else on the internet. I've searched and read so many posts on SO and so many other forums, but it is not the same. The application breaks during runtime in a line in <code>jquery-1.8.2.js</code>. I did not write this. I did not change this. This was on my list of scripts when I created a new ASP .Net project. </p>
  
  <p>Here is the line that causes the error:    </p>
  
  <pre><code>acceptData: function( elem ) {
      var noData = elem.nodeName &amp;&amp; jQuery.noData[ elem.nodeName.toLowerCase() ];
      // nodes accept data unless otherwise specified; rejection can be conditional
      return !noData || noData !== true &amp;&amp; elem.getAttribute("classid") === noData;
  }
  </code></pre>
  
  <p>I am a beginner in ASP .Net and have absolutely no idea which direction to go. Here is what I've already tried:</p>
  
  <ol>
  <li>I opened my first application that I moved out of SharePoint and tried to replicate exactly what I did there here.</li>
  <li>I checked my packages, my references, and every thing there is to check.</li>
  <li>I tried running the application on Chrome instead of IE. The application does not break and point out the line causing the error. BUT, if I open developer tools on Chrome, I still see that error. Here is what it looks like in Chrome:
  <a href="https://i.stack.imgur.com/cqpCY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cqpCY.png" alt="enter image description here"></a></li>
  </ol>
  
  <p>Again, any suggestions of changing the code is not what I am looking for. This is not my code. I am almost certain it has something to do with some references or just the basic structure of my application.</p>
  
  <p>Please ask me if you want more information. I just don't even know what to share to make it easier for you guys to help me. Let me know what information you'd like and I'd share it.</p>
  
  <p>Thank you.</p>
  
  <p><strong>Edit 1:</strong><br>
  <code>console.log(elem.nodeName)</code> results this:</p>
  
  <pre><code>#document
  function(a) {
      return a.nodeName.toLowerCase()
  }
  </code></pre>