JQuery event accumulating
<p>I am using the below to load a jQuery animated graph, however, upon subsequent clicks on the btnPreviewGraph, the results load time gets slower each time, I then realised that the events are accumulating. Can someone please advice on how to prevent the event from stacking up. </p>

<p>Thanks.</p>

<pre><code>&lt;script type="text/javascript"&gt; 

        $("#&lt;%=btnPreviewGraph.ClientID%&gt;").click(function () { 

            var Manager = Sys.WebForms.PageRequestManager.getInstance(); 
            Manager.add_endRequest(function () { 
                $(".extras_result").each(function () { 
                    // get the width of the bar from the span html  
                    var length = $(this).find("span").html(); 
                    // Animate the width of the 'p' with a callback function  
                    $(this).find("p").animate({ 'width': length }, 700, function () { 
                        // once the bar animation has finished, fade in the results  
                        $(this).find("span").fadeIn(800); 
                    }); 
                }); 
            }); 
         });  

    &lt;/script&gt;  


 &lt;asp:Button ID="btnPreviewGraph" runat="server" ClientIDMode="Static"  
                Text="Preview Qualified Statistics" CausesValidation="False"/&gt; 
             &lt;asp:UpdatePanel ID="upnlPreviewChart" runat="server" UpdateMode="Conditional"&gt; 
             &lt;Triggers&gt; 
          &lt;asp:AsyncPostBackTrigger ControlID="btnPreviewGraph" EventName="Click" /&gt; 
             &lt;/Triggers&gt; 
          &lt;ContentTemplate&gt; 
         &lt;div class="row"&gt; 
                    &lt;asp:Label runat="server" ID="Label1" Text="No. of qualified members" 
                        CssClass="label"&gt; 
                    &lt;/asp:Label&gt; 
              &lt;br /&gt;&lt;br /&gt; 
            &lt;table cellpadding="0" cellspacing="0" class="extras_table" style="height: 120px"&gt; 
  &lt;tr&gt; 
    &lt;th class="extras_y-desc" scope="row"&gt;Male&lt;/th&gt; 
    &lt;td&gt;&lt;div class="extras_result"&gt;&lt;p class="extras_p"&gt;&amp;nbsp;&lt;span&gt;&lt;asp:Literal ID="litMaleStats" runat="server"&gt;&lt;/asp:Literal&gt; 
    &lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt; 
  &lt;/tr&gt; 
  &lt;tr&gt; 
    &lt;th class="extras_y-desc" scope="row"&gt;Female&lt;/th&gt; 
    &lt;td&gt;&lt;div class="extras_result"&gt;&lt;p class="extras_p"&gt;&amp;nbsp;&lt;span&gt;&lt;asp:Literal ID="litFemaleStats" runat="server"&gt;&lt;/asp:Literal&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt; 
  &lt;/tr&gt; 
  &lt;tr&gt; 
    &lt;th class="extras_y-desc" scope="row"&gt;Unknown&lt;/th&gt; 
    &lt;td&gt;&lt;div class="extras_result"&gt;&lt;p class="extras_p"&gt;&amp;nbsp;&lt;span&gt;&lt;asp:Literal ID="litUnknownStats" runat="server"&gt;&lt;/asp:Literal&gt;&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;&lt;/td&gt; 
  &lt;/tr&gt; 
  &lt;tr&gt; 
    &lt;td&gt;&lt;/td&gt; 
    &lt;td class="extras_x-desc"&gt; 
    &lt;/td&gt; 
  &lt;/tr&gt; 
&lt;/table&gt; 
             &lt;/div&gt; 
         &lt;/ContentTemplate&gt; 
         &lt;/asp:UpdatePanel&gt;
</code></pre>
