title: VueJS: Error - Uncaught ReferenceError: $ is not defined
body: <p>I have some issues in my Vue Code I want to create a ScrollToTop Button in Vue but I get this Error message in console:</p>
  <blockquote>
  <p>Uncaught ReferenceError: $ is not defined</p>
  </blockquote>
  <p><strong>My Code :</strong></p>
  <pre><code>export default {
    data() {
      return {
        isExample: false,
        }
      }
    },
    mounted() {
      window.addEventListener('scroll', this.handleScroll);
    },
    methods: {
      handleScroll() {
        if (window.scrollY &gt; 120) {
           this.isExample = true,
           $('.example-1').addClass(&quot;is-close&quot;),
        } else if (window.scrollY &lt; 120) {
           this.isExample = false,
           $('.example-1').removeClass(&quot;is-close&quot;)
        }
      }
    }
  }
  </code></pre>