Simon Willison’s Weblog

Subscribe
Atom feed for jquery

100 items tagged “jquery”

2008

QUnit. The jQuery unit testing framework is now documented and supported as a separate project.

# 26th May 2008, 5:31 pm / qunit, jquery, javascript, testing, unittests

Cubescape. Beautiful isometric cube building tool by Cameron Adams, written in JavaScript and jQuery.

# 15th May 2008, 8:40 am / isometric, cubescape, cameronadams, javascript, jquery

Doctype: /trunk/goog. Google’s newly released JavaScript library (pure JavaScript, so more along the lines of YUI and jQuery than GWT). I haven’t found the documentation for it yet, but the code is extremely well commented. UPDATE: The documentation is spread throughout Doctype.

# 14th May 2008, 9:12 pm / jquery, goog, google, googledoctype, gwt, javascript, dojo, libraries, yui

Unobtrusive JavaScript with jQuery. The online handout for the tutorial I gave this morning at XTech.

# 6th May 2008, 6:53 pm / jquery, javascript, handout, xtech, xtech08, unobtrusive-javascript

jQuery style chaining with the Django ORM

Django’s ORM is, in my opinion, the unsung gem of the framework. For the subset of SQL that’s used in most web applications it’s very hard to beat. It’s a beautiful piece of API design, and I tip my hat to the people who designed and built it.

[... 820 words]

Classy Query. Beautifully implemented parody of class-based JavaScript and verbose namespacing as a jQuery extension, from John Resig. The source code has some neat tricks in it, in particular the buildClass() function.

# 1st April 2008, 9:48 am / john-resig, namespacing, jquery, javascript, parody, funny, aprilfools

"Why doesn't jQuery have an XPath CSS Selector implementation?" For now, my answer is: I don't want two selector implementations - it makes the code base significantly harder to maintain, increases the number of possible cross-browser bugs, and drastically increases the filesize of the resulting download.

John Resig

# 11th February 2008, 5:31 am / jquery, xpath, css, performance, john-resig

jQuery 1.2 Cheat Sheet. Handy. It helps that most of jQuery’s method names are pretty much self explanatory once you’ve been using the library for a couple of weeks.

# 10th February 2008, 9:12 pm / jquery, javascript, cheatsheet, gscottolson

Event Delegation Made Easy. Dan Webb demonstrates a neat trick for event delegation in jQuery, using CSS selectors and the jQuery .is() method to dispatch to different callbacks from a single event handler based on the target of the event.

# 10th February 2008, 3:13 pm / eventdelegation, jquery, javascript, dan-webb, delegation

Low Pro For jQuery? Dan Webb on why he prefers Prototype over jQuery: “The one big reason was that, while jQuery was super simple and concise when working on smaller projects, it offered no help in structuring larger applications”.

# 3rd February 2008, 10:16 pm / dan-webb, prototype, jquery, javascript, libraries, lowpro

jQuery.ScrollTo (via) Neat jQuery plugin for animated scrolling of both windows and overflow elements.

# 21st January 2008, 9:53 pm / jquery, javascript, scrollto, scrolling, animation, plugins

.first() and .last() methods for jQuery. I got fed up of expecting these to exist, so I wrote them as a couple of one-liner plugins.

# 16th January 2008, 9:41 pm / jquery, plugins, javascript

jQuery 1.2.2: 2nd Birthday Present. The API stays the same, but there are some healthy speed improvements, a new way of adding custom events and (most importantly) .ready() now waits for the CSS to be ready in addition to the DOM.

# 15th January 2008, 8:59 am / css, dom, javascript, jquery, libraries, documentready, ondomcontentloaded

$.comet (via) The first Comet (with Bayeux) plugin I’ve seen for jQuery—currently only handles long-polling over XMLHttpRequest, but still a promising start.

# 9th January 2008, 8:31 am / bayeux, comet, jquery, javascript, ajax, longpolling

2007

Two-Faced Django. Excellent Django tutorial by Will Larson that shows how to build a polling application with an interface both on the Web and in Facebook. Also touches on unit testing and Ajax using jQuery.

# 14th December 2007, 2:44 pm / ajax, jquery, javascript, django, python, tutorial, facebook, pyfacebook

Unobtrusively Mapping Microformats with jQuery

Microformats are everywhere. You can’t shake an electronic stick these days without accidentally poking a microformat-enabled site, and many developers use microformats as a matter of course. And why not? After all, why invent your own class names when you can re-use pre-defined ones that give your site extra functionality for free?

[... 2,277 words]

Unobtrusively Mapping Microformats with jQuery. My contribution to 24 ways: using Mapstraction to geocode hCards (extracted with jQuery) and plot them on a Google Map.

# 12th December 2007, 12:28 am / 24-ways, mapstraction, microformats, hcard, jquery, javascript, google-maps, geocoding

dojo.NodeList API docs. Support in Dojo for jQuery-style chaining operations.

# 8th November 2007, 11:16 am / javascript, libraries, dojo, jquery, chaining

Upgrading to Prototype 1.6: real world examples. I still don’t find Prototype as intuitive as jQuery, but the API improvements between 1.5 and 1.6 are very impressive.

# 24th October 2007, 7:19 pm / javascript, libraries, jquery, prototype, radiantcms

jQuery Logging (via) Brilliant four line jQuery plugin that lets you insert Firebug console.log() calls directly in to chains.

# 19th October 2007, 12:52 pm / jquery, logging, debugging, javascript, firebug, dominicmitchell

Using the jQuery test suite for your own projects. jQuery’s test suite has clever start(), stop() and expect() methods for running assertions within asynchronous code.

# 12th October 2007, 12:56 pm / jquery, javascript, testing, unittests

Roll out your own JavaScript Interfaces. Dustin shows how to build a tiny jQuery-style (chainable) library that contains your own JavaScript convenience functions.

# 6th October 2007, 12:20 am / dustin-diaz, javascript, jquery

I have another technique [...] that I'll be switching jQuery to. If you attempt to insert into the document.body before the document is fully loaded, an exception is thrown. I take advantage of that to determine when the document is fully loaded.

John Resig

# 26th September 2007, 12:21 pm / ie, domcontentloaded, jquery, javascript, unobtrusive-javascript

jQuery 1.2. Lots of neat new stuff; my favourite new feature is “Partial .load()” which lets you pull in HTML with Ajax and then use a CSS selector to grab a subset of that page and inject it in to the DOM.

# 11th September 2007, 8:44 am / jquery, html, css, javascript, selectors

Protoscript (via) JavaScript tool designed for easy prototyping of JS interactions; powered by YUI and jQuery.

# 7th September 2007, 10:55 pm / jquery, yui, javascript, libraries, prototyping, protoscript, bill-scott

jQuery 1.1.4: Faster, More Tests, Ready for 1.2. The backwards compatibility policy for 1.2 is pretty clever: provide a plugin that restores removed functionality (such as XPath selectors).

# 24th August 2007, 4:22 pm / jquery, javascript

Building a JavaScript Library. Slides from John Resig’s Google Tech Talk. Some great tips in here, including: make your APIs orthogonal, look for common patterns, keep things extensible and write the documentation yourself.

# 24th August 2007, 4:02 pm / john-resig, googletechtalk, slideshare, javascript, jquery, api-design, libraries

Live Query jQuery plugin. Ingenious plugin that lets you register jQuery event bindings to be executed when a new element matching the provided selector is added to the DOM. Performance is kept snappy by only running the check after a jQuery DOM manipulation method has been executed (append, prepend, attr etc); it won’t notice elements added using regular DOM methods.

# 22nd August 2007, 10:01 pm / jquery, javascript, dom, selectors, brandon-aaron, plugins

Learning jQuery. An entire year’s worth of jQuery tutorials, split in to beginner, intermediate and advanced.

# 17th August 2007, 11:50 am / learningjquery, jquery, javascript, tutorials

jQuery for JavaScript programmers

When jQuery came out back in January 2006, my first impression was that it was a cute hack. Basing everything around CSS selectors was a neat idea (see getElementsBySelector) but the chaining stuff looked like a bit of a gimmick and the library as a whole didn’t look like it would cover all of the bases. I wrote jQuery off as a passing fad.

[... 2,608 words]