I tried adding REQUIRED
attribute using .attr("required","true");
but its not making text area compulsory. Do not want to make all textarea
, compulsory, hence trying to do it dynamically.
Asked
Active
Viewed 5.1k times
13
-
Can you confirm which browsers you are testing with? Also can you provide the
header from your page? – Adam Jun 29 '13 at 14:10
1 Answers
40
$('#myTextarea').prop('required',true);

A. Wolff
- 74,033
- 9
- 94
- 155
-
I think its issue with my page, i have tag "" which makes page load in standard mode..but still i get error "Object # – Rohit Jun 29 '13 at 14:17
-
-
:)..yes sir..Jquery 1.7.2 and other Jquery animations and codes are working fine. Just some methods are missing , not sure why, e.g nextUntil , prop...these methods do not work..in IE and Chrome – Rohit Jun 29 '13 at 14:23
-
Is it a customized (rebuild) jquery version you are using? Test from a CDN: – A. Wolff Jun 29 '13 at 15:22