Category Archives: jQuery


Web scraping with YQL, jQuery and JSONP

Using screenr, I’ve just recorded a new sub-five minute screencast detailing a web scraping example using YQL, jQuery and JSONP.

In the video, I quickly introduce YQL‘s web scraping capability by returning a the contents of an HTML element on the JustGiving website. The data is obtained using jQuery’s getJSON method via JSONP for a cross-domain request. It’s short, but simple, and aims to give a brief example of what’s possible using YQL and jQuery.

jQuery 1.4 Reference Guide – Book Review

jQuery 1.4 Reference Guide

Unless they’ve been living in a cave for the last couple of years, web developers will be familiar with jQuery. Due to its speed, power and ubiquity, it’s become the de facto JavaScript library for anybody wishing to create cross-browser behaviour.

jQuery version 1.4 was released on January 14, 2009, and hot on the heels of that release is the accompanying ‘jQuery 1.4 Reference Guide‘ book from Packt. The book is nudging at 300 pages in length, and covers the API in a similar way to the excellent online documentation. This isn’t the book for readers with no JavaScript experience, but should be easy to pick up with somebody with at least a limited knowledge.

The eleven chapters cover the following:

  1. Anatomy of a jQuery script
  2. Selector Expressions
  3. DOM Traversal Methods
  4. DOM Manipulation Methods
  5. Event Methods
  6. Effect Methods
  7. AJAX Methods
  8. Miscellaneous Methods
  9. jQuery Properties
  10. The Plug-in API
  11. Alphabetical Quick Reference

The first chapter gently introduces the reader to the jQuery framework, as it quickly but clearly dissects an example that dynamically extracts headings from an HTML document and assembles them into a table of contents. My only criticism on this chapter is that it doesn’t mention the recommended practice of using Google’s jQuery CDN, preferring to link to a local, downloaded copy.

Subsequent chapters get into the swing of jQuery methods and techniques, using examples to complement their description. Reference guides are rarely the most exciting books, but this is actually quite easy to read, and the examples are well written and help push the reader through the content.

Chapter 10 focuses on plug-in development, and although short, does cover the essentials in a well-written overview of a simple print plugin.

Despite the quality of the online documentation, this is a worthwhile book for any jQuery developer, owing to its clear and direct content. Although the framework is evolving, the book is likely to be relevant for a long time to come.


jQuery Popup Keyboard Screencast

Hey everyone – I’ve just recorded my first ever screencast over at I talk about a jQuery popup keyboard plugin that I wrote a while back.

If you haven’t already checked out screenr, be sure to head over and check it out – it’s a fantastic way to record screencasts up to 5 minutes in length and requires no extra software or faffing about. Recording a screencast is definitely a skill in itself, and since this is my first, I hope you’ll excuse the odd ‘um’ and ‘ah’, but I hope I get the general message across. Five minutes seems like a generous amount of time, but it really does go quickly when you’re recording!

Some points that I didn’t have time to go into on the screencast:

  1. The plugin was initially developed with jQuery 1.2.6 (the most up to date version at the time), but having tested with jQuery 1.3.2 (that latest version as I write this), everything seems fine.
  2. The plugin has been tested in IE7, Firefox and Safari – everything seems to work well.
  3. I haven’t tested the plugin in IE6; I suspect there may be issues with select items and the popup keyboard.

You can download a copy of the screencast project (ZIP file, 8k) shown to have a look in greater detail.