いくつかの単語の後に改行を入れるスクリプトを探していました。私はこれをstackoverflowで見つけました:スタイルを適用し、リンクの最初の単語の後に改行を挿入します
だから、私はそれを少し変更します:
var el = $('.wtt'); //where wtt is the class of the elements that you want to add the <br />
var text = obj.html();
var parts = text.split(' ');
//number 7 represents 8 words
$('.wtt').html($('.wtt').html().replace(parts[7],parts[7]+'<br />'));