想法每天写1000字简友广场

Intro to jQuery: What Is jQuery

2019-07-09  本文已影响2人  此之木

What is jQuery?

According to the web develop course,jQuery is a DOM manipulation library. It helps us do things like:

1. select element

2. manipulate element

3. create element

4. add event listeners

5. animate elements

6. add effect

7. make HTTP Request

The point of jQuery is to help us do things faster and easier.

Why use jQuery?

1. fixes “broken” DOM API

2. brevity and clarity

3. ease of use

4. cross-browser support

5. AJAX

6. lot’s of people use jQuery

How to add jQuery?

One way to add jQuery is to download jQuery link to it locally.

Step One: Download the jQuery file

We need to go to jQuery.com and select “Download” page. Then, we can download the most recent jQuery copy and save it in the same file with your HTML file.

Step Two: Add the jQuery to the HTML page

Open the HTML page, and add the src of your saved jQuery file name in the script tag.

Step Three: Check if it is install correctly

Open your page console, and type jQuery, if it doesn’t show any red error, it means you install the jQuery correctly.

The other way to add jQuery is to link a CDN (a host copy). You can search “jQuery CDN” keyword on Google, and find the right link, then add the link address to the script src.

上一篇下一篇

猜你喜欢

热点阅读