O'Reilly logo

Enterprise Web Development by Victor Rasputnis, Viktor Gamov, Anatole Tartakovsky, Yakov Fain

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Introducing the jQuery Library

Until now, we’ve been using HTML, plain JavaScript, and CSS to create the Save The Child web application. In the real world, developers try to be more productive by using JavaScript libraries.

Libraries such as jQuery Core substantially minimize the amount of manual coding while programming the core functionality of a web application. The jQuery UI library offers widgets, animations, and advanced effects. The RequireJS library is a module loader that allows you to modularize HTML5 applications. Hundreds of micro libraries are also available that can do just one thing and can be used à la carte (visit MicroJS for details).

Libraries are different from frameworks, which we discuss in Chapter 4. Whereas frameworks force you to organize your code in a certain way, a library simply offers components that allow you to write less code.

This chapter presents the JavaScript library jQuery, or to be more precise, JQuery Core. About half of the top websites use jQuery (visit Built With for the current statistics). jQuery is simple to use and doesn’t require you to dramatically change the way you program for the Web. jQuery offers a helping hand with the tasks that most web developers need to deal with—for example, finding and manipulating DOM elements, processing browser events, and dealing with browser incompatibility, which makes your code more maintainable. Because jQuery is an extensible library, lots and lots of plug-ins have been created by developers ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required