LEARN SVG
All Chapters in jQuery
jQuery Tutorial
jQuery Introduction
jQuery Implementation
jQuery Implementation with CDN
jQuery Basic Syntax
jQuery Selectors
jQuery Events
jQuery Mouse Events
jQuery Keyboard Events
jQuery Form Events
jQuery Window Events
jQuery HTML
jQuery Get Methods
jQuery Set Methods
jQuery Add/Remove Class
jQuery CSS Method
jQuery On & Off Method
jQuery Append & Prepend
jQuery After & Before
jQuery Empty & Remove
jQuery AppendTo() & PrependTo()
jQuery Clone Method
jQuery Replace
jQuery Wrap & UnWrap
jQuery WrapAll & WrapInner
jQuery Dimensions
jQuery Width & Height
jQuery Position & Offset
jQuery Effects
jQuery scroll Method
jQuery hasClass Method
jQuery Hide Show & Toggle
jQuery fade
jQuery slide
jQuery Animate Method
jQuery Stop Method
jQuery Traversing
jQuery Chaining
jQuery parent closest
jQuery Children & Find
jQuery Sibling
jQuery First/last/eq/not/slice
jQuery has & Is Method
jQuery each Method
jQuery Advanced
jQuery page
jQuery Event Type
jQuery Event Which
jQuery Event Target
jQuery Event preventDefault
jQuery Event stopPropagation
jQuery Event Data
jQuery Plugin introduction
What is jQuery?
jQuery is a lightweight, "write less, do more", JavaScript library.
The purpose of jQuery is to make it much easier to use JavaScript on your website.
jQuery takes a lot of common tasks that require many lines of JavaScript code to
accomplish, and wraps them into methods that you can call with a single line of code.
jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and
DOM manipulation.
The jQuery library contains the following features:
HTML/DOM manipulation
CSS manipulation
HTML event methods
Effects and animations
AJAX
Utilities
Why jQuery?
There are lots of other JavaScript libraries out there, but jQuery is probably the most
popular, and also the most extendable.
Many of the biggest companies on the Web use jQuery, such as:
Google
Microsoft
IBM
Netflix
Adding jQuery to Your Web Pages
There are several ways to start using jQuery on your web site. You can:
Download the jQuery library from jQuery.com
Include jQuery from a CDN, like Google
Downloading jQuery
There are two versions of jQuery available for downloading:
Production version - this is for your live website because it has been minified and
compressed
Development version - this is for testing and development (uncompressed and
readable code)
Both versions can be downloaded from jQuery.com.
The jQuery library is a single JavaScript file, and you reference it with the
HTML <script> tag (notice that the <script> tag should be inside the <head> section):
<head>
<script src="jquery-3.7.1.min.js"></script>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Learn jquery</title>
<script src="js/jquery.js"></script>
</head>
<body>
<h1>Yahoo Baba: jquery Implementation</h1>
<script>
$(document).ready(function(){
alert(1);
});
</script>
</body>
</html>
Jquery download link : https://www.jquery.com/download
jQuery Implementation with CDN
jQuery CDN
If you don't want to download and host jQuery yourself, you can include it from a CDN
(Content Delivery Network).
Google is an example of someone who host jQuery:
Google CDN:
<head>
<script
src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.
js">
</script>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<title>Learn jquery</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"></script>
</head>
<body>
<h1>Yahoo Baba: jquery Implementation With CDN</h1>
<script>
$(document).ready(function(){
alert(1);
});
</script>
</body>
</html>