panicbus
11/15/2017 - 6:27 AM

Look for a character in a dynamic string and add or replace it with some other HTML

Look for a character in a dynamic string and add or replace it with some other HTML

// break the string to a new line after a character		
$(".my-string:contains(':')").html(function () {		
  return $(this).html().replace(":", "<br />"); 		
});