Adding <br/"> to a specific piece of text using jQuery
If this is a copy of your jquery script, try using \nfor a new line. This works in javascripts.
JQuery WORKING example:
<p id="s">text bla bla bla owner of the idea : John Smith</p>
<p>text bla bla bla bla bla bla owner of the idea : James Marino</p>
<script type="text/javascript">
$(document).ready(function() {
$("p").each(function() {
var getContent=$(this).text();
var newString=getContent.replace('owner of the idea','<br />owner of the idea');
$(this).html(newString);
});
});
</script>
If the pattern is consistent, you can make a replacement based on the character :.
$('p').each(function(){
this.html(this.html().replace(":",":<br />"));
});
Strike>
Update
According to the comment, it looks like I misunderstood the question. However, you can use the same strategy,
var p = $('p:first');
p.html(p.html().replace("owner of the idea", "<br />owner of the idea"));