Using this javascript to show more-less, is there a simple way to make the text cut off clean so that it displayes whole lines of text (doesn't slice them horizontally)?
<div id="description" style="height: 20px; overflow: hidden"> Lots of text. </div> <a href="#" id="more-less">Show more/less>></a> <script> var open = false; $('#more-less').click(function() { if (open) { $('#description').animate({height:'20px'}); } else { $('#description').animate({height:'100%'}); } open = !open; }); If it makes it easier I can truncate on <br /> tags.