jQuery disable all button of a css class and input type button
<pre><code>&lt;input class="submit2" type="button" name="submit2"  value="Submit" id="submit1" onclick=""&gt;
</code></pre>

<p>I want to disable the button on my page after clicking it. to avoid double click.</p>

<p>i have tried following code</p>

<pre><code>$(document).ready(function() {

    $('.submit2').click(function() {

        $("input.submit2").attr('disabled', true);

    });
});​
</code></pre>

<p>but it is working only when the input type of button is submit not button.</p>

<p>how to resolve this issue.</p>

<p>Thanks in advance.</p>
