current position:Home>Using jQuery in Vue

Using jQuery in Vue

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


Preface

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

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

<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.
https://en.qdmana.com/2022/118/202204280602490778.html

Random recommended