Tutorialsplane

jQuery text method


jQuery text method : is used to read or write the text in the html.

Syntax of jQuery text() method

Get Text

$(selector).text();

Note : It does not accepts any argument.

jQuery text Method with syntax

jQuery text() Method – Example 1 – Get The Text


Try it »

Set Text

$(selector).text(text);

text: String,Number or Boolean to be set as content.

jQuery text Method with syntax

jQuery text() Method – Example 2 – Set The Text


Try it »

Jquery Tutorial

jQuery Effects

jQuery Traversing

jQuery HTML

jQuery Css

jQuery Scroll

jQuery Dimensions

jQuery Ajax