The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

0

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: <div id='myDiv'> <tr> <td>Input1</td> <td><input type="text"/></td> </tr> <tr> ...


1

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 ...


0

Try using this: $("input[Title='Release Info']").props("disabled","disabled");


0

The below script works for me: <script src="https://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script> <script > $(document).ready(function() { $("textarea[Title='Notes']").attr("disabled", "disabled"); $("input[Title='Release Info']").attr("disabled","disabled"); $("input[Title='Release Date']")...


Top 50 recent answers are included