Book Image

Mastering jQuery

By : Alex Libby
Book Image

Mastering jQuery

By: Alex Libby

Overview of this book

<p>Mastering jQuery has been written not only to help maximize your skills with core functionality in the library, but also to explore some of the more intriguing ways of using the library to achieve real-world solutions that could feature on any website or online environment.</p> <p>You'll start with a look at some of the more advanced ways to incorporate the library into your pages, followed by working with forms and advanced form validation using regular expressions. Next you'll move on to animating in jQuery, advanced event handling, and using jQuery effects.</p> <p>Finally, you will develop practical examples of using jQuery with external functionality such as node-webkit, before finishing with a session on optimizing your version of the library for maximum efficiency and exploring best practices for using QUnit.</p>
Table of Contents (21 chapters)
Mastering jQuery
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Automating performance monitoring


Hands up – as a developer, how many of you have used YSlow? Good – a fair few; have you thought about automating those checks though?

That's right! We can always perform manual checks to get a feel for where performance bottlenecks are showing; however, the smarter way is to automate those checks using our good friend, Grunt. A module, created by the developer Andy Shora, is available for this purpose; we can get the source code for it from https://github.com/andyshora/grunt-yslow. Let's take a moment to get it up and running, to see how it works:

  1. Let's kick off by creating a project folder for our files. For the purpose of this exercise, I will assume it is called chapter13 (yes, I know – highly original); change the name if yours is different.

  2. For this exercise, we need to use NodeJS. I will assume you already have it installed from previous exercises; if not, then head over to http://www.nodejs.org to download and install the version appropriate for your...