This is my code :
$(".tooltip").live('click', function() {
var texte = $('#tiptip_content').text();
$('#subheader').html(texte);
});
var texte contains some texte with <br/> tags and <b></b> tag.
I would like to add this text to #subheader but with <br/> changed to “double space” and <b></b> tag deleted.
How can I do that please ?
As for a non regex solution.
Since
.text()strips out any<elements/>you can use.replaceWith()to change your<br/>to Example on jsfiddle