diff --git a/entries/text.xml b/entries/text.xml index ff9c537e..616b8a2c 100644 --- a/entries/text.xml +++ b/entries/text.xml @@ -22,7 +22,7 @@
Demonstration Box list item 1 list item 2
The .text()
method cannot be used on form inputs or scripts. To set or get the text value of input
or textarea
elements, use the .val()
method. To get the value of a script element, use the .html()
method.
The .text()
method should not be used on form inputs or scripts. To set or get the text value of input
or textarea
elements, use the .val()
method. To get the value of a script element, use the .html()
method.
As of jQuery 1.4, the .text()
method returns the value of text and CDATA nodes as well as element nodes.
<p>This is a test</p>
- The .text()
method cannot be used on input elements. For input field text, use the .val() method.
The .text()
method should not be used on input elements. For input field text, use the .val() method.
As of jQuery 1.4, the .text()
method allows us to set the text content by passing in a function.
$( "ul li" ).text(function( index ) {