title: Jquery won't work in ASP.NET UpdatePanel
body: <p>I have an ASP.NET <strong>GridView</strong> which has one column as a <strong>link</strong> - pushing the link fires a JQuery call and opens a fancybox.  Everything worked as intended until I moved my code within an <strong>UpdatePanel</strong>.</p>
  
  <p>Once in the UpdatePanel, the link no longer works.   If I take everything out of the UpdatePanel, all works fine again.</p>
  
  <p>How do I enable JQuery to recognize the GridView link from within the updatePanel?</p>
  
  <pre><code>            $("a.grid").click(function () {
              var ID = this.id;
              $.fancybox({
                  'scrolling': true,
                  'autoSize': false,
                  'width': 1015,
                  'height': 515,
                  'transitionIn': 'fade',
                  'transitionOut': 'fade',
                  'speedIn': 200,
                  'speedOut': 300,
                  'type': 'iframe',
                  'href': 'general_stats.aspx?ID=' + ID
              });
          });
  
      &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
  CellPadding="4" DataSourceID="SqlDataSourceGenStats1" Font-Size="Smaller" 
  ForeColor="#4C98AA" GridLines="None" Width="669px" Visible="False"&gt;
  &lt;AlternatingRowStyle BackColor="White" /&gt;
  &lt;Columns&gt;
      &lt;asp:BoundField DataField="PERSON_ID" HeaderText="Person ID" 
          SortExpression="PERSON_ID" /&gt;
      &lt;asp:BoundField DataField="FIRST_NAME" HeaderText="First Name" 
          SortExpression="FIRST_NAME" /&gt;
      &lt;asp:BoundField DataField="LAST_NAME" HeaderText="Last Name" 
          SortExpression="LAST_NAME" /&gt;
      &lt;asp:TemplateField HeaderText="View Stats"&gt;
      &lt;ItemTemplate&gt;
      &lt;a class="grid" id="&lt;%# Eval("PERSON_ID") %&gt;" href="#"&gt;View&lt;/a&gt;
      &lt;/ItemTemplate&gt;
          &lt;ItemStyle HorizontalAlign="Center" /&gt;
      &lt;/asp:TemplateField&gt;
  &lt;/Columns&gt;
  &lt;EditRowStyle BackColor="#2461BF" /&gt;
  &lt;FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /&gt;
  &lt;HeaderStyle BackColor="#4C98AA" Font-Bold="True" ForeColor="White" 
      HorizontalAlign="Left" /&gt;
  &lt;PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /&gt;
  &lt;RowStyle BackColor="#EFF3FB" /&gt;
  &lt;SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /&gt;
  &lt;SortedAscendingCellStyle BackColor="#F5F7FB" /&gt;
  &lt;SortedAscendingHeaderStyle BackColor="#6D95E1" /&gt;
  &lt;SortedDescendingCellStyle BackColor="#E9EBEF" /&gt;
  &lt;SortedDescendingHeaderStyle BackColor="#4870BE" /&gt;
  </code></pre>
  
  <p></p>