Get the App
SLTechnology News&Howtos  ›  Development  › 

Example Analysis of jQuery

Shulou Source: shulou.com Published: 2022-06-01 13:13:32 10月28日 Update

This article mainly shows you the "sample analysis of jQuery", which is easy to understand and well-organized. I hope it can help you solve your doubts. Let the editor lead you to study and learn the article "sample Analysis of jQuery".

Introduction to jQuery

JQuery is a JavaScript library. JQuery greatly simplifies JavaScript programming.

JQuery is a lightweight JavaScript library that writes less but does more.

$(document) .ready (function () {$("p") .click (function () {$(this). Hide ();})

If you click on me, I will disappear.

Click on me and I will disappear.

Click on me, too.

JQuery library

The jQuery library can be added to a web page with a simple line of tags.

JQuery is a library of JavaScript functions. The jQuery library contains the following features:

HTML element selection

HTML element operation

CSS operation

HTML event function

JavaScript special effects and animation

HTML DOM traversal and modification

AJAX

Utilities

Add jQuery libraries to your page

The jQuery library is located in a JavaScript file that contains all the jQuery functions.

You can add jQuery to a web page by using the following tag:

Tip: please note that the tag should be in the part of the page.

Basic jQuery instance

$(document) .ready (function () {$("button") .click (function () {$("p"). Hide ();}); This is a heading

This is a paragraph.

This is another paragraph.

Click me

Note: demonstrates the hide () function of jQuery, hiding all the

element.

Download jQuery

There are two versions of jQuery available for download: one is streamlined and the other is uncompressed (for debugging or reading).

Both versions can be downloaded from jQuery.com, or you can directly load the public CDN jQuery core files available online.

For example, use CDN for Google or CDN for Microsoft:

The above is all the content of this article "sample Analysis of jQuery". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Functions examples analysis elements content articles two can be passed files more tags versions web pages pages learning help one line events animation basics Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology Docker Microsoft Linux