reading-time icon indicating copy to clipboard operation
reading-time copied to clipboard

Only works with article

Open Xarcell opened this issue 4 years ago • 0 comments

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.

Xarcell avatar May 14 '20 11:05 Xarcell