title: JavaScript runtime error: "$" is undefined - ASP.NET WebForms (MasterPage)
body: <p>I hope someone can help me because i'm not able to find a working solution for my problem.</p>
  
  <p>I'm coding in ASP.NET WebForms with C#. I use a MasterPage.
  In this MasterPage i define my scripts in a ScriptManager.</p>
  
  <pre><code>&lt;asp:ScriptManager ID="smScripts" runat="server"&gt;
      &lt;Scripts&gt;
          &lt;asp:ScriptReference Path="~/Scripts/jquery-2.1.1.min.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/bootstrap.min.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/printArea.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/globalFunctions.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/jquery.browser.min.js" /&gt;
          &lt;asp:ScriptReference Path="~/Scripts/jquery.reject.js" /&gt;
      &lt;/Scripts&gt;
  &lt;/asp:ScriptManager&gt;
  </code></pre>
  
  <p>Now, if i use jQuery in any page e. g. Default.aspx inside a function it works fine:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      function Print(options) {
          $("div.PrintArea").printArea(options);
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>But if i try to use it directly in the script block - for example to wait until the document is ready - it doesn't work:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          // some code
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>I get the error "JavaScript runtime error: "$" is undefined".
  I don't know how i can fix this issue.</p>
  
  <p>Maybe someone can help me? Thanks in advance.</p>