kusanagi
kusanagi

Reputation: 14624

jQuery href link

I have a link <a id='id'>text1</a>.

How can I set <a id='id'>text2</a> using jQuery?

Upvotes: 1

Views: 831

Answers (2)

Patrick Karcher
Patrick Karcher

Reputation: 23613

$("#id").text("text2");

Upvotes: 4

Pranay Rana
Pranay Rana

Reputation: 176956

.text() method is there in jquery to set the text value.

check this : http://api.jquery.com/text/

Upvotes: 1

Related Questions