jQuery text() method example

In this post,  we are going to see jQuery text method example.

text method is used to get text of all matched elements and text(‘new text’) is used to set text for all matched elements.
Syntax for text() :
Syntax for text(‘new text’) :
Let’s understand with the help of example:

Live demo: Jquery text method example on jsbin.com

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to our newletter

Get quality tutorials to your inbox. Subscribe now.