$("#unique").html( function(i, oldtext){
return oldtext.replace("(","<br> (");
});
How to prepend line break before special character [closed]
Pregunta
I need to add a line break immediately prior to every instance of a parenthesis using JavaScript (specifically jQuery).
I've been unable to locate any documentation that indicates I can search a string, by specifying it's class/ID, for a special character (in this case the parenthesis) and prepend HTML to it.
Can anyone assist me? Thank you!
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow