Posts Tagged: JavaScript

HTML5 — Barcamp Auckland 5

The last proper session I went to at Barcamp Auckland 5 was “Extreme AJAX – beyond the hashbang, building a robust single page JS framework and URL schema”, presented by Barry Hannah (@barryhannah) & Mark Zeman (@markzeman). They worked on the excellent newzealand.com redesign and gave some insight into its engineering. Continue reading “HTML5 — Barcamp Auckland 5” →

Simple Combo jQuery plugin 1.1

I have just updated my Simple Combo jQuery plugin to work with recent versions of jQuery. When jQuery 1.5 came out, there was a change to its selector engine that stopped Simple Combo from modifying select lists. Then jQuery 1.5.2 introduced a subtle change to the events code that interfered with typing into combos.

Both these issues have now been fixed. Continue reading “Simple Combo jQuery plugin 1.1” →

A simple Twitter widget

This blog’s sidebar displays my latest Twitter update. I did this manually instead of using a plugin because I couldn’t find a lightweight plugin that did what I want, and I thought it would be a quick and simple project. So here’s how I did it. Continue reading “A simple Twitter widget” →

jQuery 1.5: Better, Faster… Bigger

Back when jQuery was heading towards its 1.0 release, one of the things that really impressed me was its small size. Only about 15KB of uncompressed code was enough to turn JavaScript (and particularly DOM manipulation) from a chore into a pleasure. But with each new release, new features and speed optimisations have inevitably bloated the library. Every time a new release came out, it seemed to me that the svelte jQuery I knew and loved was receding further into the past. Now that jQuery 1.5 is out, I thought I would see how jQuery has grown in size as well as stature with each release.

Graph of jQuery download size over time
Continue reading “jQuery 1.5: Better, Faster… Bigger” →

Tilt the Web with the Tilt bookmarklet

Uneven Google showed me a whole new way of looking at the web. I thought it would be nice to apply the same oblique viewpoint to other websites, so I created the Tilt bookmarklet. It should work in recent Firefox, Safari, Chrome and Opera browsers. Continue reading “Tilt the Web with the Tilt bookmarklet” →

Simple Combo Box jQuery plugin

I have just released simpleCombo, a jQuery-based combo box widget that is

  • simple
  • lightweight
  • consistent with native widget look and feel

You can try out some simpleCombo demos, and download simpleCombo from the simpleCombo project page at jquery.com. For more details, read on. Continue reading “Simple Combo Box jQuery plugin” →

Tooltips on disabled buttons with Dojo

Here’s how to add tooltips to disabled form controls using Dojo. The technique could be adapted for use in other frameworks or standalone JavaScript code.

I recently needed to add tooltips to a web application. The specific requirement was that when a button was disabled, there should be a tooltip explaining why. We were using Dojo 1.2. Now Dojo includes a Tooltip class, but it doesn’t work on disabled elements. Continue reading “Tooltips on disabled buttons with Dojo” →

Die QUIETLY!

Here is a piece of JavaScript code taken from a public commercial website. I have redacted some of the code to protect the guilty, but the rest is verbatim in all its glory. See if you can spot the error. Continue reading “Die QUIETLY!” →

elementReady: a jQuery plugin

Please see waitFor, the updated version of elementReady.

I have written a simple but useful jQuery plugin. elementReady calls a function during page load as soon as a specific element is available — even before the full DOM is loaded. It’s useful if you have unobtrusive JavaScript that you want to apply to particular page elements immediately, without having to wait for the whole DOM to load in a large page. Continue reading “elementReady: a jQuery plugin” →

Share This (jQuery): a WordPress plugin

I have made a useful modification to Alex King’s excellent Share This WordPress plugin. Share This adds a nice popup to your posts allowing readers to easily submit the post to any number of social networking and news sites. The original version relies on the large Prototype JavaScript library, which adds to the download size for the page. Share This only uses a sprinkling of its features, so I wanted to replace it with something smaller. Continue reading “Share This (jQuery): a WordPress plugin” →