current position:Home>Using jQuery in Vue

Using jQuery in Vue

2022-04-29 04:04:59fresh_ nam


I learned some time ago jquery, Whims and vue Together with , I found it really can , Hereby set down .

One 、 To configure

vue 2.x edition

Two 、 step

1. download jquery

Enter the command to download jquery

npm install jquery

2. quote

In the vue Introduce in the file jquery

  <button> Click my pop-up window </button>

<script> //  introduce jquery import $ from "jquery"; $(function () {
       $("button").click(function () {
       alert(" Click. "); }); }); export default {
      }; </script>

<style> </style>

3. result

give the result as follows :
 Insert picture description here

copyright notice
author[fresh_ nam],Please bring the original link to reprint, thank you.

Random recommended