これを試してみてください:
var step = 5;
var initialheight = 2;
$(document).ready(function() {
var currentHeight = initialheight;
var maxHeight = document.getElementsByClassName('content')[0].scrollHeight/12; // assuming 1em is 12px
$(".show-more a").on("click", function() {
var $this = $(this);
var $content = $this.parent().prev("div.content");
var linkText = $this.text();
if (linkText.toUpperCase() === "SHOW MORE") {
currentHeight += step;
$content.css('height', currentHeight + 'em');
if (currentHeight >= maxHeight - step) {
linkText = "Show less";
}
} else {
currentHeight -= step;
$content.css('height', currentHeight + 'em');
if (currentHeight <= step) {
linkText = "Show more";
}
};
$this.text(linkText);
});
});
の作業例を:http://jsfiddle.net/Wpn94/1932/