title: TypeError: $(...).parent(...).delegate is not a function
body: <p>I am using <code>WebGrid</code> in my project. When I inspect my code(of <code>aspx</code> page) in browser, I found error on console. It is : <code>TypeError: $(...).parent(...).delegate is not a function</code> and when I click on error line it shows me following CODE:</p>
  
  <pre><code>$(function() {
  $('table[data-swhgajax="true"],span[data-swhgajax="true"]').each(function() {
  var self = $(this);
  var containerId = '#' + self.data('swhgcontainer');
  var callback = getFunction(self.data('swhgcallback'));
  /*here comes the error*/
  $(containerId).parent().delegate(containerId + ' a[data-swhglnk="true"]', 'click', function() {
  $(containerId).swhgLoad($(this).attr('href'), containerId, callback);
  return false;
  });
  })
  }); 
  </code></pre>
  
  <p>Main ASPX page code:</p>
  
  <pre><code>&lt;%using (Html.BeginForm("Action", "Dashboard", FormMethod.Post)) { %&gt;
      &lt;div id="MainDashboardDiv"&gt;
          &lt;div class="UpperLiveTiles"&gt;
              &lt;div id="RecentDiv"&gt;
                  &lt;a href="../CRM/RecentCRMRequest"&gt;
                              &lt;h4 class="RequestTitle"&gt;Recent Requests&lt;/h4&gt;
                          &lt;/a&gt;
                          &lt;%Html.RenderAction("RecentRequests", Model); %&gt;
                      &lt;/div&gt;&lt;!--End of RecentDiv --&gt;
              &lt;div id="PriorityDiv"&gt;
                          &lt;a href="../CRM/HighPriorityCRMRequest"&gt;
                          &lt;h4 class="RequestTitle"&gt;High Priority Requests&lt;/h4&gt;
                          &lt;/a&gt;
                          &lt;%Html.RenderAction("PriorityRequests", Model); %&gt;
                      &lt;/div&gt;&lt;!--End of PriorityDiv --&gt;
              &lt;/div&gt;&lt;!--End of UpperLiveTiles --&gt;
      &lt;/div&gt;&lt;!--End of MainDashboardDiv --&gt;
  &lt;%} %&gt;
  </code></pre>
  
  <p>Partial View1 Code:</p>
  
  <pre><code>&lt;%    
      var grid1var = new WebGrid(source: Model, defaultSort: "Id", fieldNamePrefix: "grid1", canSort: true, ajaxUpdateContainerId: "FirstDiv", canPage: true, rowsPerPage: 5);%&gt;
  &lt;div id="FirstDiv"&gt;
      &lt;%=
          grid1var.GetHtml(htmlAttributes: new { id = "grid1" }, tableStyle: "GridTable", headerStyle: "GridHeader",
          columns: grid1var.Columns(
                  grid1var.Column(columnName: "Id", header: "ID", canSort: true),
                  grid1var.Column(columnName: "Requester_Name", header: "Employee", canSort: true),
                  grid1var.Column(columnName: "Estimated_Amount", header: "Amount", canSort: true),
                  grid1var.Column(columnName: "Date_Created", header: "Date", canSort: true, format: item =&gt; item.Date_Created.ToString("dd-MM-yyyy"))
           ))
      %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Partial View2 Code:</p>
  
  <pre><code>&lt;%    
      var grid2var = new WebGrid(source: Model, defaultSort: "Id", fieldNamePrefix: "grid2", canSort: true, ajaxUpdateContainerId: "SecondDiv", canPage: true, rowsPerPage: 5);%&gt;
  &lt;div id="SecondDiv"&gt;
      &lt;%=
          grid2var.GetHtml(htmlAttributes: new { id = "grid2" }, tableStyle: "GridTable", headerStyle: "GridHeader",
          columns: grid2var.Columns(
                  grid2var.Column(columnName: "Id", header: "ID", canSort: true),
                  grid2var.Column(columnName: "Requester_Name", header: "Employee", canSort: true),
                  grid2var.Column(columnName: "Estimated_Amount", header: "Amount", canSort: true),
                  grid2var.Column(columnName: "Date_Created", header: "Date", canSort: true, format: item =&gt; item.Date_Created.ToString("dd-MM-yyyy"))
           ))
      %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I don't know what type of error this is.</p>
  
  <hr>
  
  <p><strong>I finally catch the error:</strong></p>
  
  <p>It is just because of ready-made jquery menu I use in system is using old jquery. And it is conflicting with New Jquery version. I have removed that menu and everything is working fine.</p>