I am trying to disable almost all input elements in a form using jquery, but I need some input elements to be enabled. For example:
$(document).ready(function () { $("#document :input[name!='tloEnable']).attr("disabled", true); }); This works great on the elements I have with the same name 'tloEnable'. However there are a few other elements that have different name attributes (filename, notifyUsers, notifyTeam). How can I include them too while disabling the remaining input elements?
$(document).ready(function () { $("#document :input[name!='tloEnable], [name!='filename'], [name!='notifyUsers'], [name!='notifyTeam']).attr("disabled", true); });
disabledclass to the input elements which should be disabled.