1$(function () {
2 var txt = $(".content").text();
3
4 wordCount = txt.replace( /[^\w ]/g, "" ).split( /\s+/ ).length;
5
6 var readingTimeInMinutes = Math.floor(wordCount / 228) + 1;
7 var readingTimeAsString = readingTimeInMinutes + " min";
8
9 $('article .reading-time').html(readingTimeAsString);
10});
11