I display a part of a menu with
<li id="userInfo" role="presentation" data-toggle="tab" class="dropdown">
<a href="#" name="usernameMenu" class="dropdown-toggle" data-toggle="dropdown" role="button">
<span class="glyphicon glyphicon-user"></span><span class="caret"></span>
</a>
...
</li>
After i add a text
$('a[name="usernameMenu"] span:eq(0)').after("test");
In the html code i see
<li id="userInfo" role="presentation" data-toggle="tab" class="dropdown">
<a href="#" name="usernameMenu" class="dropdown-toggle" data-toggle="dropdown" role="button">
<span class="glyphicon glyphicon-user"></span>test<span class="caret"></span>
</a>
...
</li>
A search a way to replace test in this html code by another value