title: $(...).getJSON is not a function
body: <p>I'm trying to develop a simple API call that returns my comments in a JSON response but when I click on it I get the error</p>
  
  <p><code>$(...).getJSON is not a function</code> </p>
  
  <p>My idea is, when I click on the button "Comment"(id=showarea) it immediately prints the comments from that answer and the textarea. </p>
  
  <p>I'm "hardcoding" on the file just for testing. </p>
  
  <p>I had this file (javascript/askme/comment.js)</p>
  
  <pre><code>function initCommentReloader() {
      $('#textarea').on('click', 'a', function() {
          $.getJSON("/controller/api/comments/comment.php", {answerid: answerid}, function(data) {
              $.each(data, function(i, comment) {
                  console.log(comment);
              });
          });
      });
  }
  </code></pre>
  
  <p>but when nothing happens that way, it doesn't even recognize the click,
  then I changed to an hardcode way and the error happened. I checked my jquery include and everything seems properly included.</p>
  
  <p>This is the file where I'm trying to load the comments. Can you find anything wrong?</p>
  
  <p>I'm sorry if this is extreme newbie, but I've been stressing this way too much.</p>
  
  <p>Kind regards</p>
  
  <pre><code> &lt;head&gt;
      &lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;
  
      &lt;title&gt;AskMe&lt;/title&gt;
  
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
  
      &lt;meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"&gt;
  
  
      &lt;link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"&gt;
      &lt;script src="https://code.jquery.com/jquery-1.12.4.js"&gt;&lt;/script&gt;
      &lt;script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"&gt;&lt;/script&gt;
  
      &lt;script&gt;
          $( function() {
              $( "#tabs" ).tabs();
          } );
      &lt;/script&gt;
  
      &lt;!-- CSS --&gt;
      &lt;link rel="stylesheet" type="text/css" href="{$BASE_URL}css/fonts/font-awesome.min.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="{$BASE_URL}css/fonts/font-awesome.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="{$BASE_URL}css/styles/bootstrap.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="{$BASE_URL}css/styles/main.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="{$BASE_URL}css/styles/responsive.css"&gt;
      &lt;link rel="stylesheet" type="text/css" href="{$BASE_URL}css/styles/clean-blog.min.css"&gt;
  
      &lt;!-- JS --&gt;
      &lt;script type="text/javascript" src="{$BASE_URL}javascript/vendor/bootstrap.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src= "{$BASE_URL}javascript/Chart.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="{$BASE_URL}javascript/main.js"&gt;&lt;/script&gt;
      &lt;script src="https://cdn.ckeditor.com/4.6.2/standard/ckeditor.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  
  
  &lt;div class="post-button clearfix"&gt;
                  &lt;button class="btn icon-chat" title="Add a comment on this answer"
                          type="submit" id="showarea" name="showarea" value="Show Textarea"&gt;
                      Comment&lt;/button&gt;
                  &lt;div id="textarea"&gt;
                      {include file="comment.tpl"}
                      {include file="comment_form.tpl"}
                  &lt;/div&gt;
              &lt;/div&gt;
  
  &lt;script&gt;
      answerid = {$answer['answerid']};
      console.log();
      $("#showarea").click(function() {
          $("#showarea").getJSON("/controller/api/comments/comment.php", function (data) {
              console.log(data);
          });
      });
  &lt;/script&gt;
  {HTML::script('askme/comment.js')}
  </code></pre>