In this post we will discuss about jQuery basic introduction and simple example. In future post we will go deeper into jQuery examples.
What is jQuery?
jQuery is a JavaScript library which simplifies JavaScript programming in your application. Using this you can work with HTML document for manipulation, event handling , Ajax , Animation etc easily.
The purpose of jQuery is to make it much easier to use JavaScript on your website.
The jQuery library contains the following features:
Why jQuery?
There are many JavaScript library out there but jQuery is most popular and easy to learn. It is fast, small and more reacher in all features...
It works with mostly all browsers and many big companies are also using jQuery
If you are planning to add jQuery in your application then there are several ways to give reference of jQuery library to your application.
Both versions are available to download from http://jquery.com/download/
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.2.1.min.js"></script>
</head>
jQuery CDN
Microsoft CDN
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.js"></script>
CDNJS CDN
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
jsDelivr CDN
What is jQuery?
jQuery is a JavaScript library which simplifies JavaScript programming in your application. Using this you can work with HTML document for manipulation, event handling , Ajax , Animation etc easily.
The purpose of jQuery is to make it much easier to use JavaScript on your website.
The jQuery library contains the following features:
- HTML/DOM manipulation
- CSS manipulation
- HTML event methods
- Effects and animations
- AJAX
- Utilities
Why jQuery?
There are many JavaScript library out there but jQuery is most popular and easy to learn. It is fast, small and more reacher in all features...
It works with mostly all browsers and many big companies are also using jQuery
- Microsoft
- IBM
- Netflix
If you are planning to add jQuery in your application then there are several ways to give reference of jQuery library to your application.
- Download the jQuery library from jQuery.com
- Include jQuery from a CDN, like Google or Microsoft
- 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 are available to download from http://jquery.com/download/
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.2.1.min.js"></script>
</head>
jQuery CDN
If you don't want to download and host jQuery yourself, you can include it from a CDN (Content Delivery Network).
The following CDNs also host compressed and uncompressed versions of jQuery releases
Google CDN
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
Microsoft CDN
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.2.1.js"></script>
CDNJS CDN
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
jsDelivr CDN
<script src="https://cdn.jsdelivr.net/npm/jquery@3.2.1/dist/jquery.min.js"></script>
CDNs can offer a performance benefit by hosting jQuery on servers spread across the globe
No comments:
Post a Comment