Introduction to jQuery

jQuery Introduction

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

Basic knowledge you need

Before you start learning jQuery, you should have a basic understanding of the following knowledge:

HTMLCSSJavaScript

What is jQuery?

jQuery is a JavaScript function library.

jQuery is a lightweight "write less, do more" JavaScript library.

jQuery library includes the following functions:

HTML element selection HTML element manipulation CSS manipulation HTML event function JavaScript special effects and animation HTML DOM traversal and modification AJAXUtilities

Tips: Other than that In addition, Jquery also provides a large number of plug-ins.

Why use jQuery?

There are a large number of open source JS frameworks on the Internet, but jQuery is currently the most popular JS framework and provides a large number of extensions.

Many big companies are using jQuery, for example:

GoogleMicrosoftIBMNetflix

Is jQuery available for all browsers Browser?

jQuery community knows that JS has a lot of compatibility issues in different browsers. Currently, jQuery is compatible with all major browsers, including Internet Explorer 6!


Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="http://libs.baidu.com/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("#hide").click(function(){ $("p").hide(); }); $("#show").click(function(){ $("p").show(); }); }); </script> </head> <body> <p>如果你点击“隐藏” 按钮,我将会消失。</p> <button id="hide">隐藏</button> <button id="show">显示</button> </body> </html>
submitReset Code