title: Custom JQuery showing: Uncaught ReferenceError: $ is not defined on modal
body: <p><strong>Question Background:</strong></p>
  
  <p>I have a simple ASP.NET MVC site using Bootstrap to render a view with nine panels. On each panel is a button that when clicked should produce a modal popup.</p>
  
  <p><strong>The issue:</strong></p>
  
  <p>If I include a  <code>script link</code> to the included <code>bootstrap.min.js file</code>then I can produce a simple modal pop-up. My issue is I will need to start passing parameters to the pop-up eventually so am attempting to develop my JQuery solution. Currently when I click on a panel button in my view I can see from the Chrome console I'm getting the error:</p>
  
  <pre><code>Uncaught ReferenceError: $ is not defined
  </code></pre>
  
  <p><strong>Code:</strong></p>
  
  <p><strong><em>Note:</em></strong> This view is based on a master view that has <code>&lt;script src="/Scripts/jquery-1.9.1.js"&gt;&lt;/script&gt;</code> included as part of the defined <code>bundles</code></p>
  
  <pre><code>    @{
          ViewBag.Title = "CIBuilds";
          Layout = "~/Views/Shared/_Layout.cshtml";
  
          &lt;link rel="stylesheet" href="~/Content/bootstrap.min.css"&gt;
          &lt;link rel="stylesheet" href="~/Content/bootstrap.css"&gt;
      }
  
      @Styles.Render("~/Content/css")
  
      &lt;div class="container"&gt;
          &lt;div class="row"&gt;
              &lt;div class="col-sm-12 col-md-4 col-lg-4"&gt;
                  &lt;div class="panel panel-default"&gt;
                      &lt;div class="panel-heading"&gt;This Page is Disabled&lt;/div&gt;
                      &lt;div class="panel-body"&gt;
                          This page is temporarily disabled by the site administrator for some reason.&lt;br&gt;
                          &lt;a href="#"&gt;Click here&lt;/a&gt; to enable the page.
                          &lt;a href="#" class="btn btn-lg btn-success" data-toggle="modal" data-target="#basicModal"&gt;Click to open Modal&lt;/a&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  
          //Other 8 panels
  
          &lt;/div&gt;
  
  &lt;div class="modal fade" id="basicModal" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true"&gt;
      &lt;div class="modal-dialog"&gt;
          &lt;div class="modal-content"&gt;
              &lt;div class="modal-header"&gt;
                  &lt;button type="button" class="close" data-dismiss="modal" aria-hidden="true"&gt;&amp;amp;times;&lt;/button&gt;
                  &lt;h4 class="modal-title" id="myModalLabel"&gt;Modal title&lt;/h4&gt;
              &lt;/div&gt;
              &lt;div class="modal-body"&gt;
                  &lt;h3&gt;Modal Body&lt;/h3&gt;
              &lt;/div&gt;
              &lt;div class="modal-footer"&gt;
                  &lt;button type="button" class="btn btn-default" data-dismiss="modal"&gt;Close&lt;/button&gt;
                  &lt;button type="button" class="btn btn-primary"&gt;Save changes&lt;/button&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
      &lt;script&gt;
  
  ERROR:***** Uncaught ReferenceError: $ is not defined
  $(document).ready(function () {
      $(".btn").click(function () {
          $("#basicModal").modal("show");
      });
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>If anyone could help me sorting this that would be great.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I commented out the master views <code>RenderSection</code> reference to the defined JQuery bundle along with the bundle itself. I then added a link to <code>JQuery1.9.1.js</code> and also tried <code>1.9.1.min.js</code> to no avail.</p>
  
  <p>I also tried JQuery-1.11.2.js and 1.11.2.min.js again the issue still persists.</p>
  
  <p><strong>I am getting a different error message now which is:</strong></p>
  
  <pre><code> Uncaught TypeError: undefined is not a function
  </code></pre>
  
  <p>This is because <code>.modal()</code> is not showing as a valid method in the JQuery - which would explain the <code>undefined function</code> error message, <strong>what script should I be using?</strong></p>