title: "Uncaught TypeError: object is not a function" trying to display data using jquery ajax in MVC3
body: <p>I'm basically new to jQuery and AJAX, so I've been trying to imitate a video of someone using jQuery and AJAX in an ASP.NET MVC3 site.</p>
  
  <p>I've got a model called Post which I am trying to display</p>
  
  <pre><code>public class Post
   {
      public int PostId { get; set; }
      public int UserId { get; set; }
      public string Body { get; set; }
      public DateTime DateCreated { get; set; }
      public string Name { get; set; }
   }
  </code></pre>
  
  <p>This is the ActionResult function in my Controller</p>
  
  <pre><code> public ActionResult GetPosts()
      {
          var posts = blogRepository.GetPosts();
          return Json(posts, JsonRequestBehavior.AllowGet); 
      }
  </code></pre>
  
  <p>And this is my query method GetPosts:</p>
  
  <pre><code> public List&lt;Post&gt; GetPosts()
      {
          return (from p in db.Posts
                  orderby p.DateCreated descending
                  select p).ToList();
      }
  </code></pre>
  
  <p>Finally, the code in my View with the script that is causing the error I posted in the title: </p>
  
  <pre><code>&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Name&lt;/th&gt;
          &lt;th&gt;Body&lt;/th&gt;
          &lt;th&gt;Date&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody id="blogTableBody"&gt;
  &lt;/tbody&gt;
  &lt;/table&gt;
   &lt;script id="blogTemplate" type="text/x-jquery-tmpl"&gt;
    &lt;tr&gt;
        &lt;td&gt;${Name}&lt;/td&gt;
        &lt;td&gt;${Body}&lt;/td&gt;
        &lt;td&gt;${DateCreated}&lt;/td&gt;
    &lt;/tr&gt;
   &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function () {
  
      $.ajax({
          url: '/blog/getposts',
          type: 'GET',
          success: function (result) {
             $('#blogTemplate').tmpl(result).appendTo('#blogTableBody');
          }
      });
  });
  &lt;/script&gt;`
  </code></pre>
  
  <p>Basically, all I want is to show the post's Name, Body, and DateCreated in a list format in my view. So what am I doing wrong and how can I fix it?</p>