[Solved] replace text and attribute using jquery [closed]


First, give your “a” an id, like so:

<li><a id="myAElement" href="#" title="LinkedIn">LinkedIn</a></li>

Now to change the title, do:

$("#myAElement").attr("title","Instagram");

To change the text displayed, do:

$("#myAElement").html("Instagram");

2

solved replace text and attribute using jquery [closed]