0
Je cherchais un script pour mettre un saut de ligne après un certain nombre de mots. J'ai trouvé ici en stackoverflow: Applying a style to and inserting a line break after the first word in a linkAjouter un saut de ligne après quelques mots (ex 8)
Alors, je change un peu:
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 />'));
Toute objection contre CSS: '.wtt {width: 200px; word-wrap: mot de passe; white-space: normal;} '? –