You need to use something like:
$("#myDiv input").prop("disabled", true);
$("#myDiv select").prop("disabled", true);
$("#myDiv textarea").prop("disabled", true);
I tried below and it's working:
According to .prop() Vs .attr(),
You usually want prop() rather than attr().
In the majority of cases, prop() does what attr() used to do. Replacing calls to attr() with prop() in your code will generally work.
Properties are generally simpler to deal with than attributes. An attribute value may only be a string whereas a property can be of any ...