Easy Tutorial
❮ Js Output Jsref Match ❯

JavaScript Libraries


JavaScript Libraries - jQuery, Prototype, MooTools.


JavaScript Frameworks (Libraries)

Advanced JavaScript programming (especially handling browser inconsistencies) can be difficult and time-consuming.

To address these issues, many JavaScript (helper) libraries have emerged.

These JavaScript libraries are often referred to as JavaScript frameworks.

In this tutorial, we will explore some popular JavaScript frameworks:

All these frameworks provide functions for common JavaScript tasks, including animations, DOM manipulation, and Ajax handling.

In this tutorial, you will learn how to get started with them to make JavaScript programming easier, safer, and more enjoyable.


jQuery

jQuery is the most popular JavaScript library today.

It uses CSS selectors to access and manipulate HTML elements (DOM objects) on a webpage.

jQuery also provides companion UI (User Interface) and plugins.

Many large companies use jQuery on their websites:

For a deeper dive into jQuery, visit our jQuery Tutorial.


Prototype

Prototype is a library that provides a simple API for common web tasks.

API stands for Application Programming Interface. It is a library that contains properties and methods for manipulating the HTML DOM.

Prototype enhances JavaScript by providing classes and inheritance.


MooTools

MooTools is also a framework that provides an API to make common JavaScript programming simpler.

MooTools includes some lightweight effects and animation functions.


Other Frameworks

Here are some other frameworks not covered above:

YUI - Yahoo! User Interface Framework, a large library with a wide range of functions, from simple JavaScript features to complete internet widgets.

Ext JS - Customizable widgets for building rich internet applications.

Dojo - A toolkit for DOM manipulation, events, widgets, etc.

script.aculo.us - An open-source JavaScript framework for visual effects and interface behavior.

UIZE - Widgets, AJAX, DOM, templates, and more.


CDN - Content Delivery Network

You always want your web pages to be as fast as possible. You want the page size to be as small as possible, and you want browsers to cache as much as possible.

If many different websites use the same JavaScript framework, it makes sense to store the framework in a common location for each webpage to share.

CDN (Content Delivery Network) solves this problem. CDN is a network of servers that contain shareable code libraries.

Free CDN resources in China include:

Free CDN resources overseas include:

To use a JavaScript framework library in your webpage, simply reference the library in a <script> tag:

Referencing jQuery

<script src="https://cdn.staticfile.org/jquery/3.4.0/jquery.min.js"></script>

Using Frameworks

Before deciding to use a JavaScript framework on your webpage, it is wise to test the framework first.

JavaScript frameworks are easy to test. You don't need to install them on your computer, and there are no installation programs.

Typically, you just need to reference a library file from your webpage.

In the next chapter of this tutorial, we will walk you through the testing process for jQuery.

❮ Js Output Jsref Match ❯