I have n buttons. This button has the same name: setAlg.
I would disable all the buttons that has this name.
I have tried
$(\"input[name=
Make sure to wrap your code in ready handler:
$(function(){
$("input[name='setAlg']").attr("disabled", true);
});
But If you are using the same class for those input fields (as per your question title), you need to try this instead:
$(function(){
$("input.myclass").attr("disabled", true);
});
Where myclass
is supposed to be the class name used for those input fields.