How to capture clicked button in js functions?
<p>I have to buttons like this:</p>

<pre><code>&lt;input type='submit' id='submit' class='processAnimation'&gt;
&lt;input type='reset' id='reset' class='processAnimation'&gt;
</code></pre>

<p>Now I have two js function. First function is called when ajax request is started and seconf function is called when ajax request is completed.</p>

<pre><code>this.showLoading = function () {
     backupsource = $('.processAnimation').attr('class');
     $('.processAnimation').removeAttr('class').addClass('disabled-btn processAnimation');
     $('.processAnimation').attr( 'backupsource', backupsource );
}

this.hideLoading = function () {        
    backupsource = $('.processAnimation').attr('backupsource');
    if( backupsource != undefined ) {
       $('.processAnimation').removeAttr('class').addClass( backupsource );
       $('.processAnimation').removeAttr('backupsource');
    }   
}
</code></pre>

<p><strong>EDIT</strong>: Above two functions are working and moving flower replaced clicked button. When request is complete then button is back. Problem is that when I click one button it replace all buttons(class=procesAnimation) with moving flower. </p>

<p>Thanks</p>
