title: Replacing asp:imagebutton with processing image using jquery
body: <p>So I have an asp:imagebutton for lets say loginning into a web site.</p>
  
  <p>OnClick the page does xyz and then redirects you, there is a pause time between the redirect from when the button was clicked. To make the wait a bit more user friendly I am replacing the button with a processing image and text the javascript that does this is:</p>
  
  <pre><code>$(document).ready(function () {
      $(".ShowProcessing").click(function () {
          $(this).replaceWith("&lt;img src='/content/images/processing.gif' /&gt; Processing");
      });
  });
  </code></pre>
  
  <p>This is the button:</p>
  
  <pre><code>&lt;asp:ImageButton ID="Login" runat="server" OnClick="Login_Click" CssClass="ShowProcessing" /&gt;
  </code></pre>
  
  <p>The problem is the change to processing image happens but the asp OnClick event however does not fire.</p>