Registration for jQuery Conference 2008 is closed.

Beginner Entries

Quick Tip: Dynamically add an icon for external links

Tuesday, August 19th, 2008

A common feature I’ve seen on “web 2.0” sites and wikis is the “external link” icon: external link. While I’m not crazy about the idea of sticking these little images all over the HTML, they’re a great candidate for using progressive enhancement. In our case, we can use jQuery to add the images pretty easily.
(more…)

Three Quick Ways to Avoid Widows

Tuesday, July 8th, 2008

A few months ago I threw together a quick redesign of the Learning jQuery site. It’s nothing fancy, mind you, but I was itching to retire the thin veil covering the tired old WordPress Kubrick theme, so something had to be done.

Almost immediately upon changing the font-family and font-size of the blog post titles, I noticed a few unsightly widows (just to clarify, we’re talking about typographical widows. My mother already suspects me of avoiding her; I don’t want to add to her anxiety. ;) ).

Here is an example of one such widow: (more…)

Introduction to jQuery UI

Wednesday, July 2nd, 2008

After many months of stellar work, the jQuery UI team has released version 1.5 of their flagship suite of user-interface widgets, components, and effects. This release was focused on bringing you a standardized development API across all of the components, allowing for a more seamless experience when working with the jQuery UI library. (more…)

Updated jQuery Bookmarklet

Sunday, June 8th, 2008

About 1 1/2 years ago I put together a little “jQuerify” Bookmarklet (and blogged about it here). It’s a nice little tool that allows you to play around with jQuery on a page that doesn’t already have jQuery loaded and see the results immediately. Based on feedback from others, I’ve updated the bookmarklet a bit. Now, it first checks to see if jQuery is already loaded on the page and doesn’t bother loading it if it’s there. Also, instead of showing an alert message, it temporarily places an absolutely positioned div at the top of the page with a message saying either “This page is now jQuerified” or “This page was already jQuerified.” After 2 1/2 seconds, the message fades out and is removed from the DOM. Here is what the script looks like before it is converted to bookmarklet format (replacing spaces with %20, etc.): (more…)

Working with Events, part 1

Monday, March 31st, 2008

CSS and JavaScript are different in many ways, almost all of which are too obvious to mention. However, one difference between the two bears explanation, because it is often the cause of confusion and consternation, especially among those who are making the transition from CSS guru to jQuery novice. In fact, it was one of the first things I asked about on the jQuery mailing list back in 2006. Since then, I’ve seen at least one question on the subject every week, and sometimes as many as one per day—despite an FAQ page and these three plugins to help users deal with it.

How CSS and JavaScript Are Different

So, what’s this important difference?
(more…)

Revealing Details with jQuery

Friday, January 4th, 2008

A week or so ago, someone posted a comment on one of my previous articles, asking if I could help her split up the textual content of an element, showing the first part and replacing the second with a link that, when clicked, would reveal the text. This behavior would appear in an FAQ using a definition list (<dl>), with each question contained in a <dt> and each answer contained in a <dd>. I soon realized that the solution would be rather involved, so I decided to create a new entry out of it rather than simply answer her question in another comment.

Here is the simple definition list structure that I’ll be using for the example:

(more…)