reading-time
reading-time copied to clipboard
Only works with article
If I try to use it on any other part besides the article, it doesn't work. For example, my markup looks sorta like this:
HTML:
<article class="article">
<div class="post-header" />
<div class="post-body" />
<div class="post-footer" />
</article>
JQUERY
$('.post-body').each(function() {
let _this = $(this);
_this.readingTime({
readingTimeTarget: _this.find('.read-time'),
wordCountTarget: _this.find('.word-count')
});
})
This doesn't work, but if I use $('.article')
, then it does.