• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Matt Doyle | Elated Communications

Web and WordPress Development

  • About Me
  • Blog
    • Design & Multimedia
      • Photoshop
      • Paint Shop Pro
      • Video & Audio
    • Online Marketing
      • E-Commerce
      • Social Media
    • Running a Website
      • WordPress
      • Apache
      • UNIX and Linux
      • Using FTP
    • Web Development
      • HTML
      • CSS
      • JavaScript
      • PHP
      • Perl and CGI Scripting
  • Portfolio
  • Contact Me
  • Hire Me
Home / Blog / Web Development / JavaScript / jQuery / What Is jQuery?

What Is jQuery?

4 February 2010 / 2 Comments

jQuery logoIn this series of tutorials I’m going to explore jQuery — “The Write Less, Do More JavaScript Library”. If you code using JavaScript then you’ve probably already heard of jQuery — it’s by far the most popular JavaScript library in use today. For example, Microsoft, Twitter and ESPN all use jQuery on their sites.

To kick off the series, this article explains what jQuery is, and the kinds of things you can use it for.

So what is jQuery exactly?

jQuery is a library that makes it quicker and easier to build JavaScript webpages and web apps. Often with jQuery you can write a single line of code to achieve what would have taken 10-20 lines of regular JavaScript code.

jQuery is itself written in JavaScript, and comes in the form of a single .js file that you link to from your webpage. Your JavaScript code then accesses the library by calling various jQuery functions.

The jQuery library actually comes in 2 forms:

  • The uncompressed .js file is easy to read and modify, but it’s around 160kb in size (at the time of writing).
  • The minified .js file has all comments, whitespace, and other unnecessary characters removed from the file, squeezing the whole library into a mere 23kb. Although you can’t easily read the code, this is the version you’ll want to place on your site, as it’s much quicker for visitors to download.

jQuery is free to download and use, and is dual-licensed under the MIT and GPL licenses.

As well as the jQuery library itself, hundreds of jQuery plugins are available to add even more power and functionality to your scripts.

What can you do with jQuery?

jQuery makes it easy to write powerful JavaScript apps and create eye-catching animated effects rivalling those of Flash movies. Amongst other things, jQuery is great for:

  • Adding animated effects to elements. jQuery lets you easily add effects such as fading in/out, sliding in/out, and expanding/contracting.
  • Making XML (Ajax) requests. These use JavaScript to request additional data from the Web server without having to reload the page.
  • Manipulating the DOM. You can easily add, remove, and reorder content in the Web page using just a couple of lines of code.
  • Creating image slideshows. You can use jQuery effects to build nice animated slideshows and lightboxes.
  • Making drop-down menus. jQuery makes it easy to create multi-level dropdowns with animations.
  • Creating drag-and-drop interfaces. Use jQuery to build a page with elements that can be repositioned or reordered simply by dragging and dropping.
  • Adding power to forms. With jQuery you can easily add complex client-side form validation, create auto-complete Ajax text fields that pull data from a server-side database, and so on.
Sure, you can do all of the above by writing your own JavaScript, but it’s so much easier just to use jQuery. Why reinvent the wheel?

Another of jQuery’s strong points is that it makes it easy to write JavaScript that works on many different browsers. Incompatibilities between popular browsers such as IE, Firefox and Safari mean that you often need to write different chunks of JavaScript code for each browser. With jQuery, however, you just call the appropriate jQuery function and let jQuery deal with making the code run on different browsers. Nice!

Summary

This article has given you a brief overview of jQuery. You’ve learned that:

  • jQuery is a free JavaScript library.
  • With jQuery you can write powerful JavaScript apps using fewer lines of code.
  • jQuery is great for things like animations, Ajax requests, DOM manipulation, image effects, and user interface elements.
  • jQuery lets you easily write cross-browser JavaScript code.

In my next article I’ll show how to get started using jQuery. Until then — have fun!

Filed Under: jQuery Tagged With: ajax, animations, dom, drag and drop, effects, JavaScript library, jQuery, slideshows

Reader Interactions

Comments

  1. Jamesbr says

    16 February 2011 at 7:36 pm

    I have be playing around with HTML. I was looking at what jQuery was and was wondering if you could recommend a good book for a complete beginner? I would like to learn how to use jQuery.

    Reply
  2. matt says

    20 February 2011 at 7:21 pm

    Hi Jamesbr,

    I confess I’ve not read any jQuery books myself, but I’ve heard good things about jQuery Cookbook:

    http://www.amazon.com/jQuery-Cookbook-Solutions-Examples-Developers/dp/0596159773/

    Matt

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

To include a block of code in your comment, surround it with <pre> ... </pre> tags. You can include smaller code snippets inside some normal text by surrounding them with <code> ... </code> tags.

Allowed tags in comments: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre> .

Primary Sidebar

Hire Matt!

Matt Doyle headshot

Need a little help with your website? I have over 20 years of web development experience under my belt. Let’s chat!

Matt Doyle - Codeable Expert Certificate

Hire Me Today

Call Me: +61 2 8006 0622

Stay in Touch!

Subscribe to get a quick email whenever I add new articles, free goodies, or special offers. I won’t spam you.

Subscribe

Recent Posts

  • Make a Rotatable 3D Product Boxshot with Three.js
  • Speed Up Your WordPress Website: 11 Simple Steps to a Faster Site
  • Reboot!
  • Wordfence Tutorial: How to Keep Your WordPress Site Safe from Hackers
  • How to Make Awesome-Looking Images for Your Website

Footer

Contact Matt

  • Email Me
  • Call Me: +61 2 8006 0622

Follow Matt

  • E-mail
  • Facebook
  • GitHub
  • LinkedIn
  • Twitter

Copyright © 1996-2023 Elated Communications. All rights reserved.
Affiliate Disclaimer | Privacy Policy | Terms of Use | Service T&C | Credits