Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only works with article #44

Open
Xarcell opened this issue May 14, 2020 · 0 comments
Open

Only works with article #44

Xarcell opened this issue May 14, 2020 · 0 comments

Comments

@Xarcell
Copy link

Xarcell commented May 14, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant