Skip to content

Commit a798da0

Browse files
text: Change wording from "cannot" to "should not"
You can use `.text()` on an input, you just shouldn't do this as the behavior may not be expected. Fixes gh-1244 Closes gh-1273
1 parent 22f2e65 commit a798da0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

entries/text.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<p>
2323
<code>Demonstration Box list item 1 list item 2</code>
2424
</p>
25-
<p>The <code>.text()</code> method cannot be used on form inputs or scripts. To set or get the text value of <code>input</code> or <code>textarea</code> elements, use the <a href="/val/"><code>.val()</code></a> method. To get the value of a script element, use the <a href="/html/"><code>.html()</code></a> method.</p>
25+
<p>The <code>.text()</code> method should not be used on form inputs or scripts. To set or get the text value of <code>input</code> or <code>textarea</code> elements, use the <a href="/val/"><code>.val()</code></a> method. To get the value of a script element, use the <a href="/html/"><code>.html()</code></a> method.</p>
2626
<p>As of jQuery 1.4, the <code>.text()</code> method returns the value of text and CDATA nodes as well as element nodes.</p>
2727
</longdesc>
2828
<example>
@@ -91,7 +91,7 @@ $( "p" ).last().html( str );
9191
<pre><code>
9292
&lt;p&gt;This is a test&lt;/p&gt;
9393
</code></pre>
94-
<p>The <code>.text()</code> method cannot be used on input elements. For input field text, use the <a href="/val/">.val()</a> method.</p>
94+
<p>The <code>.text()</code> method should not be used on input elements. For input field text, use the <a href="/val/">.val()</a> method.</p>
9595
<p>As of jQuery 1.4, the <code>.text()</code> method allows us to set the text content by passing in a function.</p>
9696
<pre><code>
9797
$( "ul li" ).text(function( index ) {

0 commit comments

Comments
 (0)