jquery Basics-Introduction

Source: Internet
Author: User

1, additions and deletions to check the DOM

2, compatibility is very strong, can not consider the development of compatible

jquery has affected almost every front-end thinking style

Installation

is a JS file

Compression and non-compression

Compressed, remove all comments and spaces, open the page faster

Cdn

Cache in each region node

jquery can also be referenced via CDN

It's a different protocol.

CDN Convenience, no download, no configuration path

Increased download speed without wasting your server's bandwidth

jquery is just a grammar candy

Global variables

The method of jquery itself

This is equivalent to a selector, but after the DOM object is obtained, it is converted into a jquery object that can be converted to each other.

Native JS seems to be possible, but it's progressive.

But this chain is the same object, and it's done multiple times.

Since each operation is finished, the original jquery object will be returned

jquery objects can be chained

But there are some destructive methods, such as

It will return the child object.

The solution, plus end, will return to the upper level.

Because jquery is performing operations, it waits for the page to load, otherwise it will report that the element does not exist

HTML loaded and there are a lot of big pictures of what kind of time-consuming things

Ready does not wait for pictures and so on, just wait for HTML

Winodw. OnLoad, everything's going to be slow.

Don't mix it up!

Selector Selector

Properties, which are seldom used in general.

Pseudo-class also has a lot of messy

These two equivalents

jquery can be used for any selector.

Class Array object ..... It's just a normal object.

Location filters .... is to filter by location

Anyway, the elements are filtered according to some rules.

Feel the code can also be implemented, no need to too tangled use

jquery Basics-Introduction

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.