I am using the following code to allow line breaks in the JQuery UI tooltip function.
$(function() {
    $( document ).tooltip();
    $('.linebreak').tooltip({ 
        content: function(callback) { 
            callback($(this).prop('title').replace('|', '<br />')); 
        }
    });
});
The problem is that it only replaces the | to <br /> on the first occurrence and then just leaves the | in place for the rest.
Is there a way to replace all of them, not just the first?
 
     
     
     
     
     
    
') – BuDen Jan 24 '14 at 11:35