<article>
  <h3>This is a long text string that needs to be truncated to a shorter number of lines. For some reason we just have these really long article titles and they need to stop.</h3>
  <div class="excerpt">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec ut laoreet neque, ut posuere libero. Etiam ut ultrices mi. Donec dictum ultricies justo, vitae molestie nunc finibus ac. Morbi rutrum nunc massa, id eleifend mauris dignissim non. Pellentesque eu turpis mi. Maecenas sed nulla at massa rutrum condimentum. Pellentesque varius mi in libero vulputate, quis cursus purus consequat. Nunc sit amet arcu at nulla interdum volutpat. Nunc ut pellentesque massa. Etiam tempor nulla vel iaculis tempus. Nulla tristique pellentesque viverra. <a href="#" class="readmore">Read More</a></div>
</article>
h3 {
  font-family: 'Shadows Into Light', cursive;
  line-height: 36px;
  font-size: 36px;
  margin-top: 0;
  font-weight: normal;
}

body {
  font-family: 'Dosis';
  font-size: 16px;
  background-color: lightpink;
}

article {
  margin: 20px;
  background-color: white;
  box-shadow: 5px 5px 5px rgba(black, 0.2);
  padding: 40px;
}
View Compiled
$.fn.truncate = function (lines, readmore) {
  lines = typeof lines !== 'undefined' ? lines : 1;
  readmore = typeof readmore !== 'undefined' ? readmore : '.readmore';
  var lineHeight = window.lineHeight(this[0]);
  if (this.attr('title')) {
    this.text(this.attr('title'));
  }
  if (!this.attr('data-link') && this.find('a'+readmore).length > 0) {
    this.attr('data-link', this.find('a'+readmore)[0].outerHTML);
  }
  var link = this.attr('data-link');
  if (this.height() > lines * lineHeight) {
    if (!this.attr("title")) {
      this.attr("title", this.html());
    }
    var words = this.attr("title").split(" ");
    var str = "";
    var prevstr = "";
    this.text("");
    for (var i = 0; i < words.length; i++) {
      if (this.height() > lines * lineHeight) {
        this.html(prevstr.trim() + "&hellip; " + (typeof link !== 'undefined' ? ' ' + link : ''));
        break;
      }
      prevstr = str;
      str += words[i] + " ";
      this.html(str.trim() + "&hellip;" + (typeof link !== 'undefined' ? ' ' + link : ''));
    }
    if (this.height() > lines * lineHeight) {
      this.html(prevstr.trim() + "&hellip; " + (typeof link !== 'undefined' ? ' ' + link : ''));
    }
  }
  return this;
}

$(window).on('load resize', function() {
  $('h3').each(function() {
    $(this).truncate(1);
  });
  $('.excerpt').each(function() {
    $(this).truncate(4);
  });
});

External CSS

  1. https://fonts.googleapis.com/css?family=Dosis:400,700|Shadows+Into+Light

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js
  2. https://cdn.rawgit.com/twolfson/line-height/master/dist/line-height.js