Improve Your jQuery Knowledge with the Source Viewer

Author
Craig Buckler
Department
JavaScript & CSS
Comments
4 Comments
Diggs
Tweets
Delicious

jQuery source viewerjQuery is a great JavaScript framework. However, as with any library, sometimes it’s necessary to get under the hood to discover what’s going on. Perhaps it’s because you’re tracing a bug or are just curious about how jQuery achieves a particular UI effect.

Although jQuery compresses to under 70Kb, the uncompressed file comprises 6,000 lines of JavaScript code. Your text editor or IDE may offer a function list, but there are dozens of methods to wade through and it’s not always easy to find the code block you need. Fortunately, UK web developer James Padolsey has come up with a neat solution — the jQuery source viewer.

jQuery source viewer

The tool will find the code for any function name you enter (note that names are case-sensitive). By default, it will return version 1.4 code, but versions 1.3.2 and 1.2.6 are also available.

Other jQuery methods are highlighted and click-able so it’s easy to jump to other code blocks. You can also find functions from the URL, e.g.

The tool’s a fantastic idea and will certainly save time when hunting through the jQuery source. Thanks James. My only request: a case-insensitive auto-suggest box would make it absolutely perfect.

Related posts brought to you by Yet Another Related Posts Plugin.

Tags: ,

Posted on February 18, 2010 in JavaScript & CSS. The views and opinions in this blog post are those of its author.

This post has 4 responses so far

  1. Louis Simoneau

    Looks like a great tool. Thanks for the heads-up, Craig!

    Posted on: February 18th 2010, 10:41 am
  2. Colin

    James is a legend and this tool is extremely useful if you need/want to know what’s going on under the hood!

    Posted on: February 19th 2010, 10:22 am
  3. Montoya

    “comprises,” not “comprises of.” Otherwise thanks for the great article!

    Posted on: February 24th 2010, 3:35 am
  4. w1nk5

    Anyone know where else we can get this? The links in the article no longer work.

    Thanks

    Posted on: March 11th 2010, 4:36 am
BUILD YOUR OWN
WICKED WORDPRESS THEMES!

Create Groovilicious WordPress Themes from Scratch!