jQuery – The Technology Behind The ‘WOW’ Factor

June 13, 2011

If you find yourself asking, “How did they do that?” about some of the functional elements on today’s leading websites, the answer would most likely be jQuery. Although it’s been around for roughly five years, jQuery has picked up a lot of steam lately, and become one of the best ways to create everything from simple accordion menus to complex carousels with dynamically-loaded content.

What’s jQuery?

According to the jQuery project, jQuery is a technology that “simplifies HTML document traversing, event handling, animating and AJAX interactions for rapid Web development.” I’ll make that a little more digestible: jQuery makes true JavaScript development a lot easier by simplifying the language (a favorite among Web developers) into an ever-evolving, open-source library so a larger audience can work with it. In its most basic form, jQuery’s syntax is pretty easy to work with, and is read similarly to other design languages such as CSS.

Pros, pros and more pros

As mentioned above, jQuery takes a very useful, popular, yet sometimes complex language and syntax and makes it simple and intuitive. If you have a solid knowledge of CSS and understand very basic JavaScript, then it probably won’t take you very long to pick up some of the basic elements of jQuery and start scripting. Sure, there will be a few things in the syntax you’ll need to get up to speed on, but the jQuery API is a great resource to look at, provides plenty of basic to intermediate examples and offers a robust online forum to ask questions and solicit advice from other Web designers and developers.

The library itself is easy to load and use. All you need to do to load it is to a local, downloaded library file or external version via a script tag at the bottom of your HTML document. From there, you can script directly below it inside of another script tag, or create a separate JavaScript file and work from there.

If you’re familiar with JavaScript programming, you’ll immediately begin to notice a few major differences, such as the ability to select elements by class and the significant decrease in the amount of syntax needed to perform complicated tasks. Another noticeable aspect is how much easier it works in conjunction with CSS. It’s a big benefit that makes troubleshooting issues a lot easier. The more familiar you get with jQuery, the more you start to notice how many issues you come across that are now either CSS-related or can be solved by adding some.

The Flash Assassin

In addition to cutting down on troubleshooting time, jQuery animations are significantly easier to create and manipulate compared to anything developed in Adobe Flash. If you really take the time to study what you can accomplish with basic jQuery functions, you’ll start to question why you’ve spent as much time as you have ActionScripting, compressing and integrating heavier Flash files.

Right now, there are very specific things you may need Flash for, such as homegrown video players. But when you stop and analyze what you’re mainly using Flash for, you’ll quickly find jQuery to be a suitable replacement. Why? Well, compared to Flash files, jQuery code …

  • Loads faster
  • Can be read by search engines
  • Is easier and more efficient to work with
  • Can be viewed on mobile devices
  • Doesn’t require a user to regularly update software to run
  • Is easier to troubleshoot
  • Isn’t dependent on a unique piece of desktop software

Can be viewed on mobile devices is one of the top things to be aware of when considering when and where to use jQuery as opposed to Flash. As mobile device usage increases, users will begin to demand the same unique functionality on those devices as they find on desktop browsers. But even if Flash files suddenly become viewable on smartphones, we’ll still be working on a platform that doesn’t have the same computing capacity – specifically memory usage – as a traditional desktop computer. Therefore, businesses that want to embrace the mobile online channel and provide users with that “wow” factor are going to want to ask their Web design company about jQuery and some alternate solutions.