title: How to click a LinkButton with JQuery
body: <p>I had before this code that worked very well, but now, it does not work anymore in Chrome and IE10. I don't know why</p>
  
  <p>Javascript</p>
  
  <pre><code>    function EnterEvent(e, ctrl) {
          var keycode = (e.keyCode ? e.keyCode : e.which);
          if (keycode == 13) {
              $('[id$=btnSave]').click();
          }
          else {
              return false;
          }
      }
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>&lt;asp:TextBox ID="txtAdd" runat="server" onkeyup="EnterEvent(event, this)" /&gt;
  
  &lt;asp:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click"&gt;&lt;/asp:LinkButton&gt;
  </code></pre>
  
  <p>Server side</p>
  
  <pre><code>    protected void btnSave_Click(object sender, EventArgs e)
      {
          //Operations
      }
  </code></pre>
  
  <p>I ve already replaced this <code>$('[id$=btnAddItem]').click();</code> with <code>$('#btnAddItem').click();</code> but nothing at all. The server side is never triggered.</p>
  
  <p>I had my controls in a ajaxpanel but like this it worked before. I tested with F12 developer tools. I arrived to the click part but nothing</p>
  
  <p>Any ideas? thanks!</p>