I am formatting a registration form in WordPress. The last element tag contains a "|". This form cannot be edited directly.
This is the current markup of the forgot password tag:
<p id="nav">
| <a href="?action=lostpassword">Forgot password?</a>
</p>
Easy solution would be to just super simple replace the pipe char with nothing. ;)
$("#nav").html($("#nav").html().replace("|", ""));
Edit:
As discused (and mentioned by A. Wolff) in another answer, it is even a good idea to do this in a function, to prevent double DOM search of the p#nav
element. You can do it like this:
$("#nav").html(function(i, html){
return html.replace("|", "");
});