Thursday, 23 April 2015

Introduction to jQuery

jQuery is a lightweight "write less, do more" JavaScript library. The purpose of jQuery is to make JavaScript easy to use on our website. jQuery take a lot of common task that requires a lot of JavaScript code and wraps them into less code or just a single line. jQuery also simplifies a lot of 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
There are a lot of other JavaScript frameworks out there, but jQuery seems to be the most popular, and also the most expendable. This is because the jQuery team have written the knowledge of cross-browser issues into the jQuery library. Therefore, it will exactly the same in all browsers, including Internet Explorer 6. Many of the biggest companies use jQuery:
  • Google
  • Microsoft
  • IBM

Addding jQuery to your webpage

There are several ways to add jQuery on your website.
  • Download the jQuery library from jQuery.com
  • Include jQuery from a CDN

Downloading jQuery

There are two versions of jQuery available for downloading:
  • Production Version
  • Development Version
The jQuery library is a single JavaScript file and should be linked with the HTML <script> tag
<head>
<script src="jquery-1.11.0.min.js"></script>
</head>

Alternatives to Downloading

If you don't want to download and host jQuery directly, you can include it from a CDN (Content Delivery Network). Both Google and Microsoft host jQuery

Google CDN:
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/<br />jquery.min.js"></script>
</head>
Microsoft CDN:
<head>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.0.min.js"></script>
</head>

Related Posts:

  • Introduction to jQuery jQuery is a lightweight "write less, do more" JavaScript library. The purpose of jQuery is to make JavaScript easy to use on our website. jQuery ta… Read More
  • CSS Text Formatting HTML text can be styled using CSS. Text formatting properties are used for this purpose. Text Color The color property is used to color the HTML te… Read More
  • HTML Images HTML has the function to add images also. Adding images, increases the design and creativity of the page. Today, almost all web pages have images. … Read More
  • HTML Sections HTML elements can be grouped together for various content. Some of the common used tags are <div> and <span>. We can use <div> to … Read More
  • What is Bootstrap? Bootstrap is a powerful free front-end framework for faster and better web development. Bootstrap includes HTML and also CSS based designs for typogr… Read More

0 comments:

Post a Comment