Learn jquery from scratch (go)

Source: Internet
Author: User

This series of articles navigation

Learn jquery from scratch (i) Getting started with the epoch

Learn jquery from scratch (ii) Universal Selector

Learn jquery from scratch (iii) managing the jquery package set

Learn jquery from scratch (iv) attributes and styles for manipulating elements using jquery

Learn jquery (v) Events and event objects from scratch

Learn about jquery from scratch (vi) Ajax in jquery

Learn jquery (Seven) jquery animation from scratch-Get the page moving!

Learn jquery from scratch (eight): jquery implementation

Learn jquery from scratch (ix) jquery tool functions

Learn jquery from scratch (10) jQueryUI common function combat

Learn jquery from scratch (11) Combat form verification and auto-completion prompt plugin

I. Summary

This series of articles will take you to the fascinating world of jquery, where many authors use experience and solutions, even if you use jquery to find some cheats in reading.

This article is the first to get started, with a simple introduction to jquery and a simple example of how to write jquery code and build a development environment. Explains in detail how to work with jquery in Visual Studio.

Reprint please specify Autumn production! Blog Park debut!

two. Preface

First of all, apologize! The "zero-based learning of ASP. NET MVC" series is not updated when the filter is about to be introduced because I have been studying and learning jquery recently. See the name of this series and the article title, people who have seen my MVC series will be very familiar. Soon to the company's people to do training, so deliberately produced this tutorial.

At the same time I was writing a series of tutorials on online jquery, and I didn't find a series of tutorials that I was happy with in the blog Park and Google. I like to explain the knowledge system in a comprehensible way. Do not like to write the "study notes" type of article. At the same time, the series will be all written soon (with the pressure of work and motivation), then if time permits I will continue to update the MVC series. Once again, say sorry to the friends who are waiting for the MVC article!

In addition, most of the knowledge points in this series are derived from Turing Press's "jquery Combat" book. It is a classic in jquery books to recommend that you buy this book.

Let's start the jquery tour.

three. What is jquery

jquery is a set of JavaScript script libraries. In my blog, you'll find a series of articles on the JavaScript Lightweight script library. The JavaScript script library is similar to the. NET class library, and we encapsulate some tool methods or object methods in the class library for easy user use.

Note that jquery is a script library, not a script framework. "Library" is not equal to "framework", such as "system Assembly" is a class library, and "ASP" is the framework. jquery does not help us with scripting Reference management and feature management, which is what the scripting Framework does.

The script library helps us to complete the coding logic and implement the business functions. Using jquery will greatly improve the efficiency of writing JavaScript code, making the code written more elegant and more robust. At the same time, the rich jquery plugin on the web also makes our work "with jquery, drinking tea every day"-because we have stood on the shoulders of giants.

When you create an ASP. NET MVC project, you will find that the JQuery class library has been introduced automatically. jquery is almost the Microsoft's Queen Script Library! Perfect integration and IntelliSense support to seamlessly combine. NET and jquery! So use. NET must choose jquery instead of Dojo,extjs.

jquery has the following features:

1. Provides a powerful function function

Using these functions can help us quickly complete a variety of functions and make our code exceptionally concise.

2. Troubleshoot browser compatibility issues

JavaScript scripting compatibility with different browsers has always been a nightmare for web developers, and often a page runs normally under Ie7,firefox, and there are puzzling problems under IE6. It's a pain to write different scripts for different browsers. With jquery we're going to wake up from this nightmare, for example, the event object in jquery has been formatted to be common to all browsers, and has been used to get event triggers based on event, which is event.srcelements under IE. The standard browser, such as FF, is event.target. jquery, by unifying the event object, allows us to use event.target in all browsers to get events objects.

3. Implementing a Rich UI

jquery can be used for example, such as gradient popup, layer movement and other animated effects, let us get a better user experience. As an example of a gradient effect, I used to write a gradient animation that was compatible with IE and FF, using a lot of JavaScript code to do it, and didn't have much to help you forget about it after writing. Developing similar features again is a hassle. Using jquery today can help us quickly complete such applications.

4. Error-Correcting scripting knowledge

This is what I'm proposing, because most developers have a bad understanding of JavaScript.  For example, in the page to write the execution of the operation of the DOM statement, the HTML element or Document object directly add the "onclick" property, do not know that the onclick is actually an anonymous function and so on. A technician with these false scripting knowledge can do all the development work, but such a program is not robust. For example, "write a script that executes when loading on a page", when the page code is very small, the user loads quickly without problems, and when the page loads slightly slower, the browser "terminates the operation" error. jquery provides a number of easy ways to help us solve these problems, Once you use jquery, you will correct the knowledge of these errors--because we are all using standard and correct jquery scripting methods!

5. Too many! Waiting for us to find out.four. Hello World JQuery

By convention, let's write the Hello World program of jquery to take the first step towards using jquery.

Go to Directory Learning ...

Learn jquery from scratch (go)

Related Article

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.