SyntaxFix
Write A Post
Hire A Developer
Questions
To reference an element by id, you need to use the # qualifier.
#
Try:
alert($("#link1").text());
To replace it, you could use:
$("#link1").text('New text');
The .html() function would work in this case too.
.html()