Check out my latest project: JSBin - live JavaScript pastebin

Archive for the "javascript" Tag

Catch click events before the DOM is loaded

I'm currently working on a project that's heavily JavaScript driven. One of the key goals of the project is to get the user to click a bright yellow button (I won't go in to any more detail than that). The button is perfect, it's eye catching and when you see it, you just want to [...]

to hex

d.toString(16) Beautifully simple way to get a hex value from a number. Note that d is a number. If you want a string as a hex XML valid code, use: '&#x' + parseInt(number).toString(16).toUpperCase() + ';'

Introduction to using Dashcode

I recently wrote my first Dashboard app: HTML entities (named in the top 10 widgets by engadget.com), widget using Dashcode. Since the product (Dashcode) is still in beta, there wasn't a great deal of resource available for developing widgets, so I'm sharing my experience and any tips I can offer for development.

Safari text sizer for Firefox

I'm a fan of the textarea resize function in Safari 3 - and as such I've had my first crack at a Firefox extension. Download the Firefox text sizer extension

Linkify + upgrade to twitter plugin

The twitter plugin has just been upgraded to (optionally) search for links in the twitter text and activate them as link. So I thought I'd share the linkify code.

Add Twitter to your blog (step-by-step)

Update - updated 31-May 2008 Updated to specify timeouts, and timeout functions - see options below. Also Twitter have changed their API so 'withFriends' now requires authentication. With friends will be disabled regardless until I find out what the new plan is. Download latest Twitter.js Following on from how [...]

Performance profiling JavaScript

Firebug has a great built in JavaScript performance profiling tool, but it's not supported in IE and sadly that's what the bulk of Internet users browse with. In particular, IE profiling is something of a dark art. There's not a lot of resource available to profile that I could find that was particularly [...]