<input class="submit2" type="button" name="submit2" value="Submit" id="submit1" onclick="">
I want to disable the button on my page after clicking it. to avoid double click.
i have tried following code
$(document).ready(function() {
$('.submit2').click(function() {
$("input.submit2").attr('disabled', true);
});
});
but it is working only when the input type of button is submit not button.
how to resolve this issue.
Thanks in advance.