Skip to content

Instantly share code, notes, and snippets.

@addisonhall
Created September 22, 2014 19:10
Show Gist options
  • Save addisonhall/8d0128405865eebb540c to your computer and use it in GitHub Desktop.
Save addisonhall/8d0128405865eebb540c to your computer and use it in GitHub Desktop.
Web app text field line break fix for Business Catalyst
// Fix line breaks in web app lists
// .js .fix-br set to hidden in css
if (('.fix-br').length) {
var str;
$('.fix-br').each(function () {
str = $(this).html();
str = str.replace(/(\n)+/g, '<br>');
$(this).html(str).css('visibility', 'visible');
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment