pipwerks

Comparing and cloning objects in JavaScript

Here’s a handy way to determine if two JavaScript objects are identical without using a framework like jQuery or MooTools: var compare_objects = function (obj1, obj2) { var parameter_name; var compare = function (objA, objB, param) { var param_objA = objA[param], param_objB = typeof objB[param] === "undefined" ? false

TextAreaExpander Class for MooTools

I’ve had to create a slew of forms over the last few months, and have become fond of textareas that auto-expand when they become filled. There are a number of MooTools scripts on the interwebs that can handle this task, but none of them suited me, and I generally

Rounded corners on images using CSS3

Most browsers do not allow images to be cropped using CSS3’s border-radius. Tim Van Damme recently posted a workaround for this issue. It’s a nice trick, and doesn’t require JavaScript. It does, however, require an extra span to be added to the page’s markup, which is

JavaScript removeClasses utility

Note: If you want to skip to the final code (in both MooTools and framework-neutral flavors), it’s at the bottom of this post. The problem Readers of this blog know that I enjoy MooTools. Like other JavaScript frameworks, it has many excellent features, including addClass and removeClass functions, which

CustomInput Class: Accessible, Custom-Styled Checkboxes and Radio Buttons

I’m a big fan of the Filament Group’s UI work.  They put a lot of thought into their work, and ensure everything they make is not only beautiful, but as accessible and as semantic as possible. One of my favorite pieces of work by the Filament Group is

pipwerks © 2026