I am looking to make an entire section read-only in certain circumstances but am having trouble getting the javascript correct. I have a section with a class of "section1" that I want to make read-only and here is what I have tried thus far.
- $('.section1').attr('readonlysection','true');
- $('.section1 div').attr('readonlysection','true');
- $('.section1').attr('readonly','true');
- $('.section1 div').attr('readonly','true');
I know when setting a field to read-only you have to also advise the specific type to set (e.g. "$('.ro input').attr('readonly','True');", so I am guessing that is what is missing but so far I have not been able to figure this out. Anyone had any luck in setting a section to read-only via javascript?