title: Unable to fire jquery alert when clicking on link button inside gridview
body: <p>I have written a confirm when user tried to delete a record form <code>Gridview</code> as follows</p>
  
  <pre><code>&lt;head runat="server"&gt;
  &lt;title&gt;&lt;/title&gt;
  &lt;style type="text/css"&gt;
      BODY, HTML
      {
          padding: 0px;
          margin: 0px;
      }
      BODY
      {
          font-family: Arial, Helvetica, sans-serif;
          font-size: 12px;
          background: #FFF;
          padding: 15px;
      }
  
      H1
      {
          font-size: 20px;
          font-weight: normal;
      }
  
      H2
      {
          font-size: 16px;
          font-weight: normal;
      }
  
      FIELDSET
      {
          border: solid 1px #CCC;
          -moz-border-radius: 16px;
          -webkit-border-radius: 16px;
          border-radius: 16px;
          padding: 1em 2em;
          margin: 1em 0em;
      }
  
      LEGEND
      {
          color: #666;
          font-size: 16px;
          padding: 0em .5em;
      }
  
      PRE
      {
          font-family: "Courier New" , monospace;
          font-size: 11px;
          color: #666;
          background: #F8F8F8;
          padding: 1em;
          -moz-border-radius: 8px;
          -webkit-border-radius: 8px;
          border-radius: 8px;
      }
  
      /* Custom dialog styles */
      #popup_container.style_1
      {
          font-family: Georgia, serif;
          color: #A4C6E2;
          background: #005294;
          border-color: #113F66;
      }
  
      #popup_container.style_1 #popup_title
      {
          color: #FFF;
          font-weight: normal;
          text-align: left;
          background: #76A5CC;
          border: solid 1px #005294;
          padding-left: 1em;
      }
  
      #popup_container.style_1 #popup_content
      {
          background: none;
      }
  
      #popup_container.style_1 #popup_message
      {
          padding-left: 0em;
      }
  
      #popup_container.style_1 INPUT[type='button']
      {
          border: outset 2px #76A5CC;
          color: #A4C6E2;
          background: #3778AE;
      }
  &lt;/style&gt;
  &lt;script src="jquery.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="jquery.ui.draggable.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;!-- Core files --&gt;
  &lt;script src="jquery.alerts.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;link href="jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" /&gt;
  &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          var id = $("&lt;%# GridView1.ClientID %&gt; tr").find('#btnDelete.ClientID');
          $("#btn").click(function () {
              jConfirm('Are you sure you want to delete?', 'Confirmation Dialog', function (r) {
                  if (r == true) {
                      __doPostBack(id, "");
                  }
                  else
                      return false;
              });
          });
      });
    &lt;/script&gt;
    &lt;/head&gt;
  </code></pre>
  
  <p>My <code>GridView</code> is as follows</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
          ForeColor="#333333" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit"
          OnRowUpdating="GridView1_RowUpdating" OnRowDeleting="GridView1_RowDeleting" Width="574px"&gt;
          &lt;RowStyle BackColor="#EFF3FB" /&gt;
          &lt;Columns&gt;
              &lt;asp:TemplateField HeaderText="ID"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:Label ID="Id" runat="server" Text='&lt;%#Eval("ID") %&gt;'&gt;&lt;/asp:Label&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;EditItemTemplate&gt;
                      &lt;asp:Label ID="eid" runat="server" Text='&lt;%#Eval("ID") %&gt;'&gt;&lt;/asp:Label&gt;
                  &lt;/EditItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
              &lt;asp:TemplateField HeaderText="Name"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:Label ID="Name" runat="server" Text='&lt;%#Eval("Name") %&gt;'&gt;&lt;/asp:Label&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;EditItemTemplate&gt;
                      &lt;asp:TextBox ID="ename" runat="server" Text='&lt;%#Eval("Name") %&gt;'&gt;&lt;/asp:TextBox&gt;
                  &lt;/EditItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
              &lt;asp:TemplateField HeaderText="Address"&gt;
                  &lt;ItemTemplate&gt;
                      &lt;asp:Label ID="Address" runat="server" Text='&lt;%#Eval("Address") %&gt;'&gt;&lt;/asp:Label&gt;
                  &lt;/ItemTemplate&gt;
                  &lt;EditItemTemplate&gt;
                      &lt;asp:TextBox ID="eprice" runat="server" Text='&lt;%#Eval("Address") %&gt;'&gt;&lt;/asp:TextBox&gt;
                  &lt;/EditItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
              &lt;asp:TemplateField HeaderText=""&gt;
    &lt;ItemTemplate&gt;
                      &lt;asp:LinkButton ID="edit" runat="server" Text="Edit" CommandName="edit"&gt;&lt;/asp:LinkButton&gt;
                      &lt;input id="btn" type="button" value="Delete" class="submit_12" /&gt;
                      &lt;asp:LinkButton ID="btnDelete" runat="server" Visible="false" Text="Delete" CommandName="Delete" /&gt;
                  &lt;/ItemTemplate&gt;                    &lt;EditItemTemplate&gt;
                      &lt;asp:LinkButton ID="update" runat="server" Text="Update" CommandName="update"&gt;&lt;/asp:LinkButton&gt;
                      &lt;asp:LinkButton ID="cancel" runat="server" Text="Cancel" CommandName="cancel"&gt;&lt;/asp:LinkButton&gt;
                  &lt;/EditItemTemplate&gt;
              &lt;/asp:TemplateField&gt;
          &lt;/Columns&gt;
          &lt;FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /&gt;
          &lt;PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /&gt;
          &lt;SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /&gt;
          &lt;HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /&gt;
          &lt;EditRowStyle BackColor="#2461BF" /&gt;
          &lt;AlternatingRowStyle BackColor="White" /&gt;
      &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>But I am unable to get the required alert can any one tell where I went wrong</p>
  
  <p><img src="https://i.stack.imgur.com/b3ZMq.png" alt="enter image description here"></p>
  
  <p>I am using alerts from this site</p>
  
  <p><a href="http://labs.abeautifulsite.net/archived/jquery-alerts/demo/" rel="nofollow noreferrer">http://labs.abeautifulsite.net/archived/jquery-alerts/demo/</a></p>
  
  <p>added all required scripts but still same issue</p>
  
  <p>Scripts added</p>
  
  <p><img src="https://i.stack.imgur.com/G9jlL.png" alt="enter image description here"></p>