With jQuery version 1.2.3, I am trying to add nodes after textarea elements with the attribute 'maxlength', but this does not work:
$("textarea[@maxlength]").after("<b>Aint working</b>");
This is the HTML code:
<textarea maxlength="500">This is a test.</textarea>
<textarea maxlength="250">Yet another line.</textarea>
<textarea maxlength="125">Bar or foo, whatever.</textarea>
The odd thing is if I change the maxlength attribute, for example. rel than works just fine!
See an example of real life: http://www.host2000.be/_temp/jquery_tests_counter.html
PS: I know the [@attribute] notation, which is no longer supported in jQuery 1.3, but this has nothing to do with the problem.
source share