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.
-
Can you confirm which browsers you are testing with? Also can you provide the <DOCTYPE> header from your page?– AdamJun 29, 2013 at 14:10
Add a comment
|
1 Answer
$('#myTextarea').prop('required',true);
-
I think its issue with my page, i have tag "<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />" which makes page load in standard mode..but still i get error "Object #<Object> has no method 'prop' "..however, if i put same code in single HTML page..it works fine...thanks though– RohitJun 29, 2013 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– RohitJun 29, 2013 at 14:23
-
Is it a customized (rebuild) jquery version you are using? Test from a CDN: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>– A. WolffJun 29, 2013 at 15:22